From 25a2d721899881ff8dde28d6975648a0bad769f5 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 4 Feb 2011 08:29:20 +0000 Subject: After discovering #3376 was fixed I gave in and... After discovering #3376 was fixed I gave in and tried to write a test. Now that the fiddling is over you can write repl tests without creating 5000 streams and settings. Look at test/files/run/bug3376.scala or jvm/interpreter.scala to see. Test case closes #3376, no review. --- test/files/run/bug3376.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/files/run/bug3376.scala (limited to 'test/files/run/bug3376.scala') diff --git a/test/files/run/bug3376.scala b/test/files/run/bug3376.scala new file mode 100644 index 0000000000..5cff50185c --- /dev/null +++ b/test/files/run/bug3376.scala @@ -0,0 +1,16 @@ +import scala.tools.nsc.interpreter._ + +object Test { + class M[@specialized T] { } + + val code = """ + |class M[@specialized T] { override def toString = "mmm" } + |val m1 = new M[Int]() + |val m2 = new M[Float]() + |val m3 = new M[String]() + |""".stripMargin + + def main(args: Array[String]): Unit = { + (ILoop run code).lines drop 1 foreach println + } +} -- cgit v1.2.3