summaryrefslogtreecommitdiff
path: root/test/files/run/t6168b/SomeClass.java
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-03-25 15:50:41 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-03-25 15:58:32 +0100
commitedee27f59f17873b378d96504d0b20013a31d081 (patch)
treea87c8a5d5050c9f128381f86346856a0a0a85a66 /test/files/run/t6168b/SomeClass.java
parent1187c9896c097e6e591e5655b35f52c06b3c900a (diff)
downloadscala-edee27f59f17873b378d96504d0b20013a31d081.tar.gz
scala-edee27f59f17873b378d96504d0b20013a31d081.tar.bz2
scala-edee27f59f17873b378d96504d0b20013a31d081.zip
SI-6168 Retain prefix when parsing types in JVM signatures
When reading Java classfiles, the generic signatures are used to construct the corresponding Scala type signatures. In the enclosed test case, the field `SomeClass.f` had the JVM signature: LContext<LSomeClass;>.Field<Ljava.lang.Integer;>; The parser first (correctly) parsed the prefix as `Context[SomeClass]`. It then looked up the type symbol for `Field` in that that type. It then discarded the parsed prefix, and instead used the prefix from the info of the type symbol: `Context[ParentType]`. This commit changes the signature parser after the first `.` to use the result of prior parsing as the prefix. I've also included a test case with Java static inner classes, which don't require any special treatment.
Diffstat (limited to 'test/files/run/t6168b/SomeClass.java')
-rw-r--r--test/files/run/t6168b/SomeClass.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t6168b/SomeClass.java b/test/files/run/t6168b/SomeClass.java
new file mode 100644
index 0000000000..566c55e1c5
--- /dev/null
+++ b/test/files/run/t6168b/SomeClass.java
@@ -0,0 +1,11 @@
+public class SomeClass {
+ private final Context<SomeClass> context = new Context<SomeClass>();
+ {
+ context.setParent(this);
+ }
+
+ public final Context.Field<Integer> f = context.intField();
+
+}
+
+