 
   test "new/1" do
     assert Map.new(%{a: 1, b: 2}) == %{a: 1, b: 2}
-    assert Map.new(MapSet.new([a: 1, b: 2, a: 3])) == %{b: 2, a: 3}
+    assert Map.new(MapSet.new(a: 1, b: 2, a: 3)) == %{b: 2, a: 3}
   end
 
   test "new/2" do
     transformer = fn {key, value} -> {key, value * 2} end
     assert Map.new(%{a: 1, b: 2}, transformer) == %{a: 2, b: 4}
-    assert Map.new(MapSet.new([a: 1, b: 2, a: 3]), transformer) == %{b: 4, a: 6}
+    assert Map.new(MapSet.new(a: 1, b: 2, a: 3), transformer) == %{b: 4, a: 6}
   end
 
   test "take/2" do


  test "maps with generated variables in key" do
    assert %{"#{1}" => 1} == %{"1" => 1}
    assert %{(for x <- 1..3, do: x) => 1} == %{[1, 2, 3] => 1}
    assert %{(with x = 1, do: x) => 1} == %{1 => 1}
    assert %{(with {:ok, x} <- {:ok, 1}, do: x) => 1} == %{1 => 1}
    assert %{(try do raise "error" rescue _ -> 1 end) => 1} == %{1 => 1}
    assert %{(try do throw 1 catch x -> x end) => 1} == %{1 => 1}
    assert %{(try do a = 1; a rescue _ -> 2 end) => 1} == %{1 => 1}
    assert %{(try do 1 else a -> a end) => 1} == %{1 => 1}
  end

  test "matching with map as a key" do


    assert_raise CaseClauseError, fn ->
      foo = foo()

      case invalid_struct do
        %^foo{} -> :ok
      end
