diff options
author | Paul Phillips <paulp@improving.org> | 2012-08-28 13:37:02 -0700 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-09-05 21:14:59 -0400 |
commit | 816cecf9a95989dfc570f2acad87d4156b09e2ff (patch) | |
tree | a9fa538f694b01da4366543c08c6a9538f17adf7 /test/files | |
parent | e26104db07769ca17fc33cc53a151f22d4298ce3 (diff) | |
download | scala-816cecf9a95989dfc570f2acad87d4156b09e2ff.tar.gz scala-816cecf9a95989dfc570f2acad87d4156b09e2ff.tar.bz2 scala-816cecf9a95989dfc570f2acad87d4156b09e2ff.zip |
More fix for invalid companions.
Eliminated InvalidCompanions exception entirely. Anyone's
guess why we unholstered this exception every time someone
calls "isCodefinedWith" rather than when symbols are created.
I moved the check into Namers, where it can be done once and
with sufficient finesse not to crash so much.
With this patch in place, "playbench" can be built with java7.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t5031.check | 6 | ||||
-rw-r--r-- | test/files/neg/t5031b.check | 5 | ||||
-rw-r--r-- | test/files/neg/t5031b/a.scala | 3 | ||||
-rw-r--r-- | test/files/neg/t5031b/b.scala | 3 |
4 files changed, 14 insertions, 3 deletions
diff --git a/test/files/neg/t5031.check b/test/files/neg/t5031.check index 8983d8daf9..2f1090c321 100644 --- a/test/files/neg/t5031.check +++ b/test/files/neg/t5031.check @@ -1,5 +1,5 @@ -Id.scala:3: error: Companions 'class Test' and 'object Test' must be defined in same file: +package.scala:2: error: Companions 'class Test' and 'object Test' must be defined in same file: Found in t5031/package.scala and t5031/Id.scala -object Test - ^ + class Test + ^ one error found diff --git a/test/files/neg/t5031b.check b/test/files/neg/t5031b.check new file mode 100644 index 0000000000..3bc2284a4d --- /dev/null +++ b/test/files/neg/t5031b.check @@ -0,0 +1,5 @@ +b.scala:3: error: Companions 'class Bippy' and 'object Bippy' must be defined in same file: + Found in t5031b/a.scala and t5031b/b.scala +object Bippy + ^ +one error found diff --git a/test/files/neg/t5031b/a.scala b/test/files/neg/t5031b/a.scala new file mode 100644 index 0000000000..0ab9aa9769 --- /dev/null +++ b/test/files/neg/t5031b/a.scala @@ -0,0 +1,3 @@ +package foo + +class Bippy diff --git a/test/files/neg/t5031b/b.scala b/test/files/neg/t5031b/b.scala new file mode 100644 index 0000000000..bdef237af5 --- /dev/null +++ b/test/files/neg/t5031b/b.scala @@ -0,0 +1,3 @@ +package foo + +object Bippy |