diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-21 00:26:41 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-21 00:26:41 -0800 |
commit | af89c3d258c98351868e5ed5acee97e5b2268452 (patch) | |
tree | 91626b2cb682f87504fdca6b6ade74405b976b8b /test | |
parent | 434c21c5f101ecc7435d9577a8ee8bd576f571c1 (diff) | |
parent | e57af7dae72cae7d071f848edaf1fdbe32939ed8 (diff) | |
download | scala-af89c3d258c98351868e5ed5acee97e5b2268452.tar.gz scala-af89c3d258c98351868e5ed5acee97e5b2268452.tar.bz2 scala-af89c3d258c98351868e5ed5acee97e5b2268452.zip |
Merge pull request #3365 from retronym/ticket/8133
Fix regression with package objects, overloading
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t8133/A_1.scala | 5 | ||||
-rw-r--r-- | test/files/run/t8133/B_2.scala | 15 | ||||
-rw-r--r-- | test/files/run/t8133b/A_1.scala | 4 | ||||
-rw-r--r-- | test/files/run/t8133b/B_2.scala | 9 |
4 files changed, 33 insertions, 0 deletions
diff --git a/test/files/run/t8133/A_1.scala b/test/files/run/t8133/A_1.scala new file mode 100644 index 0000000000..a2836cdb3a --- /dev/null +++ b/test/files/run/t8133/A_1.scala @@ -0,0 +1,5 @@ +// a.scala +package object pkg { + class AnyOps(val x: Any) extends AnyVal + def AnyOps(x: Any) = new AnyOps(x) +} diff --git a/test/files/run/t8133/B_2.scala b/test/files/run/t8133/B_2.scala new file mode 100644 index 0000000000..b80e10952d --- /dev/null +++ b/test/files/run/t8133/B_2.scala @@ -0,0 +1,15 @@ +package pkg { + package object other + package other { + class Crash { + AnyOps(0) + () + } + } +} + +object Test { + def main(args: Array[String]): Unit = { + new pkg.other.Crash + } +} diff --git a/test/files/run/t8133b/A_1.scala b/test/files/run/t8133b/A_1.scala new file mode 100644 index 0000000000..24bbfc118d --- /dev/null +++ b/test/files/run/t8133b/A_1.scala @@ -0,0 +1,4 @@ +package object pkg { + def foo(x: Int): String = "a" + def foo(x: String): String = "b" +} diff --git a/test/files/run/t8133b/B_2.scala b/test/files/run/t8133b/B_2.scala new file mode 100644 index 0000000000..865ca0c0b0 --- /dev/null +++ b/test/files/run/t8133b/B_2.scala @@ -0,0 +1,9 @@ +// b.scala +package pkg { + package object other + package other { class Crash { foo("") } } +} + +object Test { + def main(args: Array[String]): Unit = new pkg.other.Crash +} |