summaryrefslogtreecommitdiff
path: root/test/files/pos/t9111-inliner-workaround
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-03-11 11:34:08 -0700
committerLukas Rytz <lukas.rytz@gmail.com>2015-03-11 12:53:36 -0700
commit027e97981d9b6a3783e9ab247cc898017b3de821 (patch)
tree209a0d646f54c14b119924ba55773c382f50a701 /test/files/pos/t9111-inliner-workaround
parent4e982451decdc3821febfe975e1b8e406a3741e8 (diff)
downloadscala-027e97981d9b6a3783e9ab247cc898017b3de821.tar.gz
scala-027e97981d9b6a3783e9ab247cc898017b3de821.tar.bz2
scala-027e97981d9b6a3783e9ab247cc898017b3de821.zip
Workaround for SI-9111
The inliner forces some method symbols to complete that would not be completed otherwise. This triggers SI-9111, in which the completer of a valid Java method definition reports an error in mixed compilation. The workaround disables error reporting while completing lazy method and class symbols in the backend.
Diffstat (limited to 'test/files/pos/t9111-inliner-workaround')
-rw-r--r--test/files/pos/t9111-inliner-workaround/A_1.java13
-rw-r--r--test/files/pos/t9111-inliner-workaround/Test_1.scala10
2 files changed, 23 insertions, 0 deletions
diff --git a/test/files/pos/t9111-inliner-workaround/A_1.java b/test/files/pos/t9111-inliner-workaround/A_1.java
new file mode 100644
index 0000000000..bc60b68ea6
--- /dev/null
+++ b/test/files/pos/t9111-inliner-workaround/A_1.java
@@ -0,0 +1,13 @@
+public class A_1 {
+ public static class T { }
+
+ public static class Inner {
+ public static class T { }
+
+ public void foo(T t) { }
+
+ public T t = null;
+
+ public class Deeper extends T { }
+ }
+}
diff --git a/test/files/pos/t9111-inliner-workaround/Test_1.scala b/test/files/pos/t9111-inliner-workaround/Test_1.scala
new file mode 100644
index 0000000000..1a00fff833
--- /dev/null
+++ b/test/files/pos/t9111-inliner-workaround/Test_1.scala
@@ -0,0 +1,10 @@
+object Test extends App {
+ println(new A_1.Inner())
+
+ // Accessing foo or Deeper triggers the error of SI-9111.
+ // However, when not referring to those definitions, compilation should
+ // succeed, also if the inliner is enabled.
+
+ // println(i.foo(null))
+ // new i.Deeper()
+}