diff options
author | James Iry <jamesiry@gmail.com> | 2013-01-13 20:33:52 -0800 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-01-13 20:39:13 -0800 |
commit | 3ef487ecb6733bfe3c13d89780ebcfc81f9a5ea0 (patch) | |
tree | 05816010e6607a5495c25010e4bca6836d960281 /test/files/pos/t2130-2.flags | |
parent | 5d65772762072aa950a488c666673dc248b01d6d (diff) | |
download | scala-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/t2130-2.flags')
-rw-r--r-- | test/files/pos/t2130-2.flags | 1 |
1 files changed, 1 insertions, 0 deletions
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 |