summaryrefslogtreecommitdiff
path: root/test/files/neg/t4440.check
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-07-23 11:14:47 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-07-23 11:18:59 +0200
commitee93df064b8b48f9e600d5ea99a0ebc5e0848345 (patch)
treea1cf7d0999eff748b4b63546110f5f53d29f9723 /test/files/neg/t4440.check
parent7b62eeea86c62f5e068c366065f8f4c2e6624eb7 (diff)
downloadscala-ee93df064b8b48f9e600d5ea99a0ebc5e0848345.tar.gz
scala-ee93df064b8b48f9e600d5ea99a0ebc5e0848345.tar.bz2
scala-ee93df064b8b48f9e600d5ea99a0ebc5e0848345.zip
SI-4440 workaround: avoid outer accessor that'll vanish
outer accessors of final classes are dropped in constructors apply some foresight in explicit outer and replace those doomed outer checks by `true` (since this is unfortunate, we generate an unchecked warning)
Diffstat (limited to 'test/files/neg/t4440.check')
-rw-r--r--test/files/neg/t4440.check13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t4440.check b/test/files/neg/t4440.check
new file mode 100644
index 0000000000..2861dc3040
--- /dev/null
+++ b/test/files/neg/t4440.check
@@ -0,0 +1,13 @@
+t4440.scala:12: error: The outer reference in this type test cannot be checked at run time.
+ case _: b.Inner => println("b")
+ ^
+t4440.scala:13: error: The outer reference in this type test cannot be checked at run time.
+ case _: a.Inner => println("a") // this is the case we want
+ ^
+t4440.scala:16: error: The outer reference in this type test cannot be checked at run time.
+ case _: a.Inner => println("a")
+ ^
+t4440.scala:17: error: The outer reference in this type test cannot be checked at run time.
+ case _: b.Inner => println("b") // this is the case we want
+ ^
+four errors found