diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-20 17:05:43 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-26 12:23:59 -0700 |
commit | d47a15b01557ca6c6416892a98d35324bf0a13d7 (patch) | |
tree | 13af045887b72dc7d70ba36f368ae8fc8b8d22dc /test/pending | |
parent | 78879c4dab79c0da8c31a4f7210c46fc0bd892c7 (diff) | |
download | scala-d47a15b01557ca6c6416892a98d35324bf0a13d7.tar.gz scala-d47a15b01557ca6c6416892a98d35324bf0a13d7.tar.bz2 scala-d47a15b01557ca6c6416892a98d35324bf0a13d7.zip |
Pending tests for SI-5954, SI-6225, SI-5877, SI-4695.
Which are all package object bugs. Plus one more test
regarding package object overloading.
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/pos/overloading-boundaries.scala | 37 | ||||
-rw-r--r-- | test/pending/pos/t4695/T_1.scala | 4 | ||||
-rw-r--r-- | test/pending/pos/t4695/T_2.scala | 4 | ||||
-rw-r--r-- | test/pending/pos/t5877.scala | 5 | ||||
-rw-r--r-- | test/pending/pos/t5954/T_1.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/t5954/T_2.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/t5954/T_3.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/t6225.scala | 11 |
8 files changed, 85 insertions, 0 deletions
diff --git a/test/pending/pos/overloading-boundaries.scala b/test/pending/pos/overloading-boundaries.scala new file mode 100644 index 0000000000..d2e9fdbb12 --- /dev/null +++ b/test/pending/pos/overloading-boundaries.scala @@ -0,0 +1,37 @@ +package bar { + object bippy extends (Double => String) { + def apply(x: Double): String = "Double" + } +} + +package object bar { + def bippy(x: Int, y: Int, z: Int) = "(Int, Int, Int)" +} + +object Test { + def main(args: Array[String]): Unit = { + println(bar.bippy(5.5d)) + println(bar.bippy(1, 2, 3)) + } +} + +/**** + +% scalac3 a.scala +a.scala:13: error: not enough arguments for method bippy: (x: Int, y: Int, z: Int)String. +Unspecified value parameters y, z. + println(bar.bippy(5.5d)) + ^ +one error found + +# Comment out the call to bar.bippy(5.5d) - compiles +% scalac3 a.scala + +# Compiles only from pure source though - if classes are present, fails. +% scalac3 a.scala +a.scala:2: error: bippy is already defined as method bippy in package object bar + object bippy extends (Double => String) { + ^ +one error found + +****/ diff --git a/test/pending/pos/t4695/T_1.scala b/test/pending/pos/t4695/T_1.scala new file mode 100644 index 0000000000..70fb1a7f21 --- /dev/null +++ b/test/pending/pos/t4695/T_1.scala @@ -0,0 +1,4 @@ +package foo + +class Bar { } +package object Bar { } diff --git a/test/pending/pos/t4695/T_2.scala b/test/pending/pos/t4695/T_2.scala new file mode 100644 index 0000000000..70fb1a7f21 --- /dev/null +++ b/test/pending/pos/t4695/T_2.scala @@ -0,0 +1,4 @@ +package foo + +class Bar { } +package object Bar { } diff --git a/test/pending/pos/t5877.scala b/test/pending/pos/t5877.scala new file mode 100644 index 0000000000..b77605f7f2 --- /dev/null +++ b/test/pending/pos/t5877.scala @@ -0,0 +1,5 @@ +package foo { } + +package object foo { + implicit class Foo(val s: String) { } +} diff --git a/test/pending/pos/t5954/T_1.scala b/test/pending/pos/t5954/T_1.scala new file mode 100644 index 0000000000..0064c596b6 --- /dev/null +++ b/test/pending/pos/t5954/T_1.scala @@ -0,0 +1,8 @@ +package p { + package base { + class X + } + package object base { + case class B() + } +} diff --git a/test/pending/pos/t5954/T_2.scala b/test/pending/pos/t5954/T_2.scala new file mode 100644 index 0000000000..0064c596b6 --- /dev/null +++ b/test/pending/pos/t5954/T_2.scala @@ -0,0 +1,8 @@ +package p { + package base { + class X + } + package object base { + case class B() + } +} diff --git a/test/pending/pos/t5954/T_3.scala b/test/pending/pos/t5954/T_3.scala new file mode 100644 index 0000000000..0064c596b6 --- /dev/null +++ b/test/pending/pos/t5954/T_3.scala @@ -0,0 +1,8 @@ +package p { + package base { + class X + } + package object base { + case class B() + } +} diff --git a/test/pending/pos/t6225.scala b/test/pending/pos/t6225.scala new file mode 100644 index 0000000000..d7dff3c419 --- /dev/null +++ b/test/pending/pos/t6225.scala @@ -0,0 +1,11 @@ +package library.x { + class X { + class Foo + implicit val foo = new Foo + } +} +package library { package object x extends X } +package app { + import library.x._ + object App { implicitly[Foo] } +} |