diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-09-01 13:56:12 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-09-01 13:56:12 +0000 |
commit | 4b6277f8511bab6d4d0fc01f398bd9e967b94bdb (patch) | |
tree | 5f19a4128de401b769afd39b8e99f321fba4e1f9 /src | |
parent | 906248a4b2dc4275a91c335af9d214aa883d1037 (diff) | |
download | scala-4b6277f8511bab6d4d0fc01f398bd9e967b94bdb.tar.gz scala-4b6277f8511bab6d4d0fc01f398bd9e967b94bdb.tar.bz2 scala-4b6277f8511bab6d4d0fc01f398bd9e967b94bdb.zip |
Fixed #1315, outer instances are passed implici...
Fixed #1315, outer instances are passed implicitly. Reorganized nested
classes tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 10 |
1 files changed, 9 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 92e4f910ed..aa6a13ebc4 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -477,7 +477,15 @@ abstract class ClassfileParser { info match { case MethodType(formals, restpe) => assert(restpe.typeSymbol == definitions.UnitClass) - info = MethodType(formals, clazz.tpe) + // if this is a non-static inner class, remove the explicit outer parameter + val newFormals = innerClasses.get(externalName) match { + case Some(entry) if (entry.jflags & JAVA_ACC_STATIC) == 0 => + assert(formals.head.typeSymbol == clazz.owner, formals.head.typeSymbol + ": " + clazz.owner) + formals.tail + case _ => + formals + } + info = MethodType(newFormals, clazz.tpe) } val sym = getOwner(jflags) .newMethod(NoPosition, name).setFlag(sflags).setInfo(info) |