summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-01-13 20:33:52 -0800
committerJames Iry <jamesiry@gmail.com>2013-01-13 20:39:13 -0800
commit3ef487ecb6733bfe3c13d89780ebcfc81f9a5ea0 (patch)
tree05816010e6607a5495c25010e4bca6836d960281 /test/files/pos
parent5d65772762072aa950a488c666673dc248b01d6d (diff)
downloadscala-3ef487ecb6733bfe3c13d89780ebcfc81f9a5ea0.tar.gz
scala-3ef487ecb6733bfe3c13d89780ebcfc81f9a5ea0.tar.bz2
scala-3ef487ecb6733bfe3c13d89780ebcfc81f9a5ea0.zip
SI-5954 Implementation restriction preventing companions in package objs
Companion objects (and thus also case classes) in package objects caused an assert about an overloaded symbol when everything was compiled twice. It's a hairy problem that doesn't fit in 2.10.1. So this fix adds an implementation restriction. It also has a test to make sure the error messages are clean and reasonably friendly, and does not catch other things defined in package objects. The test includes a commented out test in case somebody thinks they've solved the underlying problem. A handful of tests were falling afoul of the new implementation restriction. I verified that they do in fact fail on second compile so they aren't false casualties. But they do test real things we'd like to work once the re-compile issue is fixed. So I added a -X flag to disable the implementation restriction and made all the tests accidentally clobbered by the restriction use that flag.
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/package-case.flags1
-rw-r--r--test/files/pos/t2130-1.flags1
-rw-r--r--test/files/pos/t2130-2.flags1
-rw-r--r--test/files/pos/t3999b.flags1
-rw-r--r--test/files/pos/t4052.flags1
5 files changed, 5 insertions, 0 deletions
diff --git a/test/files/pos/package-case.flags b/test/files/pos/package-case.flags
new file mode 100644
index 0000000000..2f174c4732
--- /dev/null
+++ b/test/files/pos/package-case.flags
@@ -0,0 +1 @@
+-Ycompanions-in-pkg-objs
diff --git a/test/files/pos/t2130-1.flags b/test/files/pos/t2130-1.flags
new file mode 100644
index 0000000000..2f174c4732
--- /dev/null
+++ b/test/files/pos/t2130-1.flags
@@ -0,0 +1 @@
+-Ycompanions-in-pkg-objs
diff --git a/test/files/pos/t2130-2.flags b/test/files/pos/t2130-2.flags
new file mode 100644
index 0000000000..2f174c4732
--- /dev/null
+++ b/test/files/pos/t2130-2.flags
@@ -0,0 +1 @@
+-Ycompanions-in-pkg-objs
diff --git a/test/files/pos/t3999b.flags b/test/files/pos/t3999b.flags
new file mode 100644
index 0000000000..2f174c4732
--- /dev/null
+++ b/test/files/pos/t3999b.flags
@@ -0,0 +1 @@
+-Ycompanions-in-pkg-objs
diff --git a/test/files/pos/t4052.flags b/test/files/pos/t4052.flags
new file mode 100644
index 0000000000..2f174c4732
--- /dev/null
+++ b/test/files/pos/t4052.flags
@@ -0,0 +1 @@
+-Ycompanions-in-pkg-objs