diff options
-rw-r--r-- | test/files/neg/bug1038.check | 5 | ||||
-rw-r--r-- | test/files/neg/bug1038.scala | 8 | ||||
-rw-r--r-- | test/files/pos/bug1272.scala | 9 | ||||
-rw-r--r-- | test/files/run/bug1005.check | 2 | ||||
-rw-r--r-- | test/files/run/bug1005.scala | 19 |
5 files changed, 43 insertions, 0 deletions
diff --git a/test/files/neg/bug1038.check b/test/files/neg/bug1038.check new file mode 100644 index 0000000000..e09cbbc510 --- /dev/null +++ b/test/files/neg/bug1038.check @@ -0,0 +1,5 @@ +bug1038.scala:4: error: not enough arguments for constructor X: (x: Int)X. +Unspecified value parameter x. + val a = new X + ^ +one error found diff --git a/test/files/neg/bug1038.scala b/test/files/neg/bug1038.scala new file mode 100644 index 0000000000..9fdcae207f --- /dev/null +++ b/test/files/neg/bug1038.scala @@ -0,0 +1,8 @@ +class X(x : Int) + +object Y { + val a = new X + import a._ + implicit val b : Int = 1 + implicit val c = 2 +}
\ No newline at end of file diff --git a/test/files/pos/bug1272.scala b/test/files/pos/bug1272.scala new file mode 100644 index 0000000000..d86a909ae5 --- /dev/null +++ b/test/files/pos/bug1272.scala @@ -0,0 +1,9 @@ +object ImplicitTest { + implicit val i : Int = 10 + implicit def a(implicit i : Int) : Array[Byte] = null + implicit def b[T](implicit i : Int) : Array[T] = null + + def fn[T](implicit x : T) = 0 + + val x = fn[Array[Byte]] +}
\ No newline at end of file diff --git a/test/files/run/bug1005.check b/test/files/run/bug1005.check new file mode 100644 index 0000000000..6ec0929090 --- /dev/null +++ b/test/files/run/bug1005.check @@ -0,0 +1,2 @@ +Halp! +Halp! diff --git a/test/files/run/bug1005.scala b/test/files/run/bug1005.scala new file mode 100644 index 0000000000..5ccd89dd85 --- /dev/null +++ b/test/files/run/bug1005.scala @@ -0,0 +1,19 @@ +object Test +{ + class Foo[T](x : Array[AnyRef]) { def bar = x.asInstanceOf[Array[T]] } + class Bar[T](x : Array[T]) { def bar = x.asInstanceOf[Array[AnyRef]] } + + object FromMono{ + def main(args : Array[String]) = (new Foo[AnyRef](Array[AnyRef]("Halp!"))).bar + } + + object FromPoly{ + def main(args : Array[String]) = (new Bar[AnyRef](Array[AnyRef]("Halp!"))).bar + } + + def main(args: Array[String]): Unit = { + println(FromMono main null mkString) + println(FromPoly main null mkString) + } +} + |