Skip to content
Browse files

Add a test for conflicting record inference

  • Loading branch information...
1 parent 362ff69 commit d9029c7f98f311acda111f54044cab2a152074a6 @josevalim josevalim committed Dec 3, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/elixir/test/elixir/kernel/record_rewriter_test.exs
View
5 lib/elixir/test/elixir/kernel/record_rewriter_test.exs
@@ -244,4 +244,9 @@ defmodule Kernel.RecordRewriterTest do
clause = clause(fn(x = BadRange[]) -> x.first end)
assert optimize_clause(clause) == { clause, [x: BadRange], nil }
end
+
+ test "noop for conflicting inference" do
+ clause = clause(fn(x = Macro.Env[]) -> ^x = Range[]; x.first end)
+ assert optimize_clause(clause) == { clause, [x: nil], nil }
+ end
end

0 comments on commit d9029c7

Please sign in to comment.
Something went wrong with that request. Please try again.