diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5655.check | 30 | ||||
-rw-r--r-- | test/files/run/t5655.scala | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/test/files/run/t5655.check b/test/files/run/t5655.check new file mode 100644 index 0000000000..43ebd50e7a --- /dev/null +++ b/test/files/run/t5655.check @@ -0,0 +1,30 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> object x { def x={} } +defined module x + +scala> import x._ +import x._ + +scala> x +<console>:12: error: reference to x is ambiguous; +it is imported twice in the same scope by +import x._ +and import x + x + ^ + +scala> x +<console>:12: error: reference to x is ambiguous; +it is imported twice in the same scope by +import x._ +and import x + x + ^ + +scala> + +scala> diff --git a/test/files/run/t5655.scala b/test/files/run/t5655.scala new file mode 100644 index 0000000000..b15feb788e --- /dev/null +++ b/test/files/run/t5655.scala @@ -0,0 +1,10 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ +object x { def x={} } +import x._ +x +x + """ +} |