From 03e3a40951ec7d1612cb668973f4d2e5e01872e9 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 3 May 2012 11:21:31 -0700 Subject: Test case closes SI-5655. Still some issues with the repl namespace, which should be managed in a first class way, not defensively/reactively. --- test/files/run/t5655.check | 30 ++++++++++++++++++++++++++++++ test/files/run/t5655.scala | 10 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/files/run/t5655.check create mode 100644 test/files/run/t5655.scala (limited to 'test/files/run') 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 +:12: error: reference to x is ambiguous; +it is imported twice in the same scope by +import x._ +and import x + x + ^ + +scala> x +: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 + """ +} -- cgit v1.2.3