diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-21 08:20:35 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-21 08:20:35 -0700 |
commit | f406550146250f5a6036d3d778582efa6d68252a (patch) | |
tree | a1248bb164c0bd83117c13c113e117e02b43a6a1 /test/files/neg | |
parent | 79e3cf338333e61ba1d0d03a1cfe5558718cf539 (diff) | |
parent | 01c673efd80d687b6ba3cec09059a024cec6e7c2 (diff) | |
download | scala-f406550146250f5a6036d3d778582efa6d68252a.tar.gz scala-f406550146250f5a6036d3d778582efa6d68252a.tar.bz2 scala-f406550146250f5a6036d3d778582efa6d68252a.zip |
Merge pull request #593 from som-snytt/ticket/5760-pkgobj-warn
SI-5760: Improve error message for package$Klass conflict with Klass
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t5760-pkgobj-warn.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala | 11 | ||||
-rw-r--r-- | test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala | 11 |
3 files changed, 26 insertions, 0 deletions
diff --git a/test/files/neg/t5760-pkgobj-warn.check b/test/files/neg/t5760-pkgobj-warn.check new file mode 100644 index 0000000000..a89398c3f7 --- /dev/null +++ b/test/files/neg/t5760-pkgobj-warn.check @@ -0,0 +1,4 @@ +stalepkg_2.scala:6: error: Foo is already defined as class Foo in package object stalepkg + class Foo + ^ +one error found diff --git a/test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala b/test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala new file mode 100644 index 0000000000..ed4b731bb0 --- /dev/null +++ b/test/files/neg/t5760-pkgobj-warn/stalepkg_1.scala @@ -0,0 +1,11 @@ + +package object stalepkg { + class Foo +} + +package stalepkg { + object Test { + def main(args: Array[String]) { + } + } +} diff --git a/test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala b/test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala new file mode 100644 index 0000000000..9abcdbab17 --- /dev/null +++ b/test/files/neg/t5760-pkgobj-warn/stalepkg_2.scala @@ -0,0 +1,11 @@ + +package object stalepkg { +} + +package stalepkg { + class Foo + object Test { + def main(args: Array[String]) { + } + } +} |