diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-03-11 11:34:08 -0700 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-03-11 12:53:36 -0700 |
commit | 027e97981d9b6a3783e9ab247cc898017b3de821 (patch) | |
tree | 209a0d646f54c14b119924ba55773c382f50a701 /test/files | |
parent | 4e982451decdc3821febfe975e1b8e406a3741e8 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/pos/t9111-inliner-workaround.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t9111-inliner-workaround/A_1.java | 13 | ||||
-rw-r--r-- | test/files/pos/t9111-inliner-workaround/Test_1.scala | 10 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/files/pos/t9111-inliner-workaround.flags b/test/files/pos/t9111-inliner-workaround.flags new file mode 100644 index 0000000000..63b5558cfd --- /dev/null +++ b/test/files/pos/t9111-inliner-workaround.flags @@ -0,0 +1 @@ +-Ybackend:GenBCode -Yopt:l:classpath
\ No newline at end of file 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() +} |