diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-08-28 16:15:43 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-11 23:22:07 +0200 |
commit | 38a488ea17e4ed42b65df4095c2eac738a63f5c4 (patch) | |
tree | 703be8007786ac12ebe70274b6c580c76096e869 /test/files/neg/t7007.check | |
parent | f04257b8414745d8e13bee213e551ef01c839602 (diff) | |
download | scala-38a488ea17e4ed42b65df4095c2eac738a63f5c4.tar.gz scala-38a488ea17e4ed42b65df4095c2eac738a63f5c4.tar.bz2 scala-38a488ea17e4ed42b65df4095c2eac738a63f5c4.zip |
SI-7007 Test case shows we disallow premature `this` access
Rather than the old behaviour, which compiled successfully
but led us into the jaws of a LinkageError.
Related to SI-6666.
Diffstat (limited to 'test/files/neg/t7007.check')
-rw-r--r-- | test/files/neg/t7007.check | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t7007.check b/test/files/neg/t7007.check new file mode 100644 index 0000000000..e22ecb9e4e --- /dev/null +++ b/test/files/neg/t7007.check @@ -0,0 +1,7 @@ +t7007.scala:5: error: Implementation restriction: <$anon: A => B> requires premature access to class Crash. + def this(a: Seq[A]) = this(a.collect{ case b: B => b}, a.collect{ case b: B => b}) + ^ +t7007.scala:5: error: Implementation restriction: <$anon: A => B> requires premature access to class Crash. + def this(a: Seq[A]) = this(a.collect{ case b: B => b}, a.collect{ case b: B => b}) + ^ +two errors found |