summaryrefslogtreecommitdiff
path: root/test/files/run/t7359
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-04-12 13:38:42 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-05-16 11:56:20 -0700
commit7f9feba0213fc210c7752ab210f900c016032699 (patch)
tree80bcfeab588097788c6e7fe1463b74a95de0c78e /test/files/run/t7359
parent487584caa97d0905df06e32c292c00fcd82a2fa3 (diff)
downloadscala-7f9feba0213fc210c7752ab210f900c016032699.tar.gz
scala-7f9feba0213fc210c7752ab210f900c016032699.tar.bz2
scala-7f9feba0213fc210c7752ab210f900c016032699.zip
[backport #1727] SI-7359 cyclic nested java class
The original commit message (from 54a84a36d5): SI-6548 reflection correctly enters jinners When completing Java classes, runtime reflection enumerates their fields, methods, constructors and inner classes, loads them and enters them into either the instance part (ClassSymbol) or the static part (ModuleSymbol). However unlike fields, methods and constructors, inner classes don't need to be entered explicitly - they are entered implicitly when being loaded. This patch fixes the double-enter problem, make sure that enter-on-load uses the correct owner, and also hardens jclassAsScala against double enters that can occur in a different scenario.
Diffstat (limited to 'test/files/run/t7359')
-rw-r--r--test/files/run/t7359/Cyclic_1.java3
-rw-r--r--test/files/run/t7359/Test_2.scala6
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t7359/Cyclic_1.java b/test/files/run/t7359/Cyclic_1.java
new file mode 100644
index 0000000000..42b46c1aed
--- /dev/null
+++ b/test/files/run/t7359/Cyclic_1.java
@@ -0,0 +1,3 @@
+abstract class Cyclic {
+ static interface Inner<T extends Inner> { }
+} \ No newline at end of file
diff --git a/test/files/run/t7359/Test_2.scala b/test/files/run/t7359/Test_2.scala
new file mode 100644
index 0000000000..bb6f4cb2d9
--- /dev/null
+++ b/test/files/run/t7359/Test_2.scala
@@ -0,0 +1,6 @@
+import scala.reflect.runtime.universe._
+
+object Test extends App {
+ typeOf[Cyclic].members
+ println("ok")
+} \ No newline at end of file