diff options
author | Martin Odersky <odersky@gmail.com> | 2007-02-03 16:45:20 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-02-03 16:45:20 +0000 |
commit | 100951d18780675748fdc548a60fd5df629d8aba (patch) | |
tree | f53d059962c04375caebb105314aa5ac4aa8cc45 /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | |
parent | 4077f049359e931b5dfb03ac9213686499047721 (diff) | |
download | scala-100951d18780675748fdc548a60fd5df629d8aba.tar.gz scala-100951d18780675748fdc548a60fd5df629d8aba.tar.bz2 scala-100951d18780675748fdc548a60fd5df629d8aba.zip |
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index c0850ddb0a..058e6bf675 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -47,8 +47,7 @@ abstract class ClassfileParser { protected var isScala: boolean = _ // does class file describe a scala class? protected var hasMeta: boolean = _ // does class file contain jaco meta attribute?s protected var busy: boolean = false // lock to detect recursive reads - protected var classTParams: Map[Name,Symbol] = - collection.immutable.ListMap.Empty[Name,Symbol] + protected var classTParams = Map[Name,Symbol]() protected val fresh = new scala.tools.nsc.util.FreshNameCreator private object metaParser extends MetaParser { @@ -362,12 +361,13 @@ abstract class ClassfileParser { val c = pool.getClassSymbol(in.nextChar) if (c != clazz) throw new IOException("class file '" + in.file + "' contains wrong " + c) - val superType = if (isAttribute) { in.nextChar; definitions.ClassfileAttributeClass.tpe } + val superType = if (isAttribute) { in.nextChar; definitions.AttributeClass.tpe } else pool.getSuperClass(in.nextChar).tpe val ifaceCount = in.nextChar - val parents = (superType :: - (for (val i <- List.range(0, ifaceCount)) - yield pool.getSuperClass(in.nextChar).tpe)) + var ifaces = for (val i <- List.range(0, ifaceCount)) yield pool.getSuperClass(in.nextChar).tpe + if (isAttribute) ifaces = definitions.ClassfileAttributeClass.tpe :: ifaces + val parents = superType :: ifaces + instanceDefs = newScope staticDefs = newScope val classInfo = ClassInfoType(parents, instanceDefs, clazz) |