diff options
author | Paul Phillips <paulp@improving.org> | 2013-04-02 13:19:08 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-04-02 13:19:08 -0700 |
commit | 4c85fb324dc3ea0eeebe590e39e8084558834f3a (patch) | |
tree | 5c8c87b52dae1d62ea0bc3fe253b1a27b3870840 /src/compiler | |
parent | c77dd12d8d1041af0b9f79c19a03eb34d34a9327 (diff) | |
parent | edee27f59f17873b378d96504d0b20013a31d081 (diff) | |
download | scala-4c85fb324dc3ea0eeebe590e39e8084558834f3a.tar.gz scala-4c85fb324dc3ea0eeebe590e39e8084558834f3a.tar.bz2 scala-4c85fb324dc3ea0eeebe590e39e8084558834f3a.zip |
Merge pull request #2310 from retronym/ticket/6168
SI-6168 Retain prefix when parsing types in JVM signatures
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 879320c016..d75be92f36 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -606,6 +606,8 @@ abstract class ClassfileParser { val sym = getOwner(jflags).newValue(name.toTermName, NoPosition, sflags) val isEnum = (jflags & JAVA_ACC_ENUM) != 0 + // Note: the info may be overrwritten later with a generic signature + // parsed from SignatureATTR sym setInfo { if (isEnum) ConstantType(Constant(sym)) else info @@ -660,6 +662,8 @@ abstract class ClassfileParser { } info = MethodType(newParams, clazz.tpe) } + // Note: the info may be overrwritten later with a generic signature + // parsed from SignatureATTR sym.setInfo(info) importPrivateWithinFromJavaFlags(sym, jflags) parseAttributes(sym, info) @@ -753,7 +757,9 @@ abstract class ClassfileParser { accept('.') val name = subName(c => c == ';' || c == '<' || c == '.').toTypeName val clazz = tpe.member(name) - tpe = processClassType(processInner(clazz.tpe)) + val dummyArgs = Nil // the actual arguments are added in processClassType + val inner = typeRef(pre = tpe, sym = clazz, args = dummyArgs) + tpe = processClassType(inner) } accept(';') tpe |