summaryrefslogtreecommitdiff
path: root/test/pending/neg/t3633/test/Test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/neg/t3633/test/Test.scala')
-rw-r--r--test/pending/neg/t3633/test/Test.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/pending/neg/t3633/test/Test.scala b/test/pending/neg/t3633/test/Test.scala
new file mode 100644
index 0000000000..2c54e7b3e9
--- /dev/null
+++ b/test/pending/neg/t3633/test/Test.scala
@@ -0,0 +1,23 @@
+package test
+
+final class Test extends PackageProtected {
+ def bar = foo
+}
+
+package another {
+ object Main {
+ def bug1(t: Test) {
+ // Can always be replicated.
+ println(t.foo)
+ }
+ def bug2(t: Test) {
+ // Conditions to replicate: must use -optimise, class Test must be final
+ println(t.bar)
+ //@noinline is a usable workaround
+ }
+ def main(args: Array[String]) {
+ bug1(new Test)
+ bug2(new Test)
+ }
+ }
+}