aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-03-09 18:55:24 +0100
committerMartin Odersky <odersky@gmail.com>2016-03-09 18:55:24 +0100
commit8c99865cecf41b844e0710620337d26838e647ef (patch)
tree09820e3e17922fea5e1a8c0ff0faf3a6c5a09b9a /tests
parentff8731041a522b73fde6bddd2d7077d19d35b6b0 (diff)
downloaddotty-8c99865cecf41b844e0710620337d26838e647ef.tar.gz
dotty-8c99865cecf41b844e0710620337d26838e647ef.tar.bz2
dotty-8c99865cecf41b844e0710620337d26838e647ef.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/i1145.scala11
1 files changed, 11 insertions, 0 deletions
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
+}