diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/bug3376.check | 13 | ||||
-rw-r--r-- | test/files/run/bug3376.scala | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/files/run/bug3376.check b/test/files/run/bug3376.check new file mode 100644 index 0000000000..7286096022 --- /dev/null +++ b/test/files/run/bug3376.check @@ -0,0 +1,13 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> +scala> defined class M + +scala> m1: M[Int] = mmm + +scala> m2: M[Float] = mmm + +scala> m3: M[String] = mmm + +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 + } +} |