From 8c99865cecf41b844e0710620337d26838e647ef Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 9 Mar 2016 18:55:24 +0100 Subject: Fix bug where ambiguous references were not reported There was a mssing condition which meant Tyepr thought it was at the outermost scope where but was mistaken. Fixes #1145 --- tests/neg/i1145.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/neg/i1145.scala (limited to 'tests/neg') diff --git a/tests/neg/i1145.scala b/tests/neg/i1145.scala new file mode 100644 index 000000000..b33300b91 --- /dev/null +++ b/tests/neg/i1145.scala @@ -0,0 +1,11 @@ +object A { + def x = 3 + + def y = { + import B._ + x // error: ambiguous + } +} +object B { + def x = 3 +} -- cgit v1.2.3