diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-07-13 10:56:44 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-07-13 10:56:44 +0000 |
commit | d93096ce9283641f027e0c81b6f52ef07a1e1bf0 (patch) | |
tree | 92710dbd2cbdaed9fb24fecbac15f97fc60bb4a3 /src/compiler | |
parent | ca623645faee8ba8dc5d88da3b2faf0eceabc288 (diff) | |
download | scala-d93096ce9283641f027e0c81b6f52ef07a1e1bf0.tar.gz scala-d93096ce9283641f027e0c81b6f52ef07a1e1bf0.tar.bz2 scala-d93096ce9283641f027e0c81b6f52ef07a1e1bf0.zip |
Synced dotnet library with rev 12294
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala | 16 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala index 115eb8e7ff..39c128d847 100644 --- a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala +++ b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala @@ -303,17 +303,17 @@ abstract class GenMSIL extends SubComponent { log("creating attributes: " + attributes + " for member : " + member) for (attr@ AnnotationInfo(typ, annArgs, nvPairs) <- attributes ; if attr.isConstant) - /* !typ.symbol.hasFlag(Flags.JAVA) */ + /* !typ.typeSymbol.hasFlag(Flags.JAVA) */ { // assert(consts.length <= 1, // "too many constant arguments for attribute; "+consts.toString()) // Problem / TODO having the symbol of the attribute type would be nicer - // (i hope that type.symbol is the same as the one in types2create) + // (i hope that type.typeSymbol is the same as the one in types2create) // AND: this will crash if the attribute Type is already compiled (-> not a typeBuilder) // when this is solved, types2create will be the same as icodes.classes, thus superfluous - val attrType: TypeBuilder = getType(typ.symbol).asInstanceOf[TypeBuilder] -// val attrType: MsilType = getType(typ.symbol) + val attrType: TypeBuilder = getType(typ.typeSymbol).asInstanceOf[TypeBuilder] +// val attrType: MsilType = getType(typ.typeSymbol) // Problem / TODO: i have no idea which constructor is used. This // information should be available in AnnotationInfo. @@ -1918,7 +1918,7 @@ abstract class GenMSIL extends SubComponent { if (sym.tpe.paramTypes.length == 1) { toTypeKind(sym.tpe.paramTypes(0)) match { case ARRAY(elem) => - if (elem.toType.symbol == definitions.StringClass){ + if (elem.toType.typeSymbol == definitions.StringClass){ return true } case _ => () @@ -1982,7 +1982,7 @@ abstract class GenMSIL extends SubComponent { def createTypeBuilder(iclass: IClass) { def getMsilType(tpe: Type): MsilType = { - val sym = tpe.symbol + val sym = tpe.typeSymbol types.get(sym) match { case Some(mtype) => mtype case None => createTypeBuilder(classes(sym)); types(sym) @@ -1999,14 +1999,14 @@ abstract class GenMSIL extends SubComponent { val superType = if (isInterface(sym)) null else getMsilType(parents.head) if (settings.debug.value) - log("super type: " + parents(0).symbol + ", msil type: " + superType) + log("super type: " + parents(0).typeSymbol + ", msil type: " + superType) val interfaces: Array[MsilType] = parents.tail.map(getMsilType).toArray if (parents.length > 1) { if (settings.debug.value){ log("interfaces:") for (i <- 0.until(interfaces.length)){ - log(" type: " + parents(i + 1).symbol + ", msil type: " + interfaces(i)) + log(" type: " + parents(i + 1).typeSymbol + ", msil type: " + interfaces(i)) } } } diff --git a/src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala b/src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala index 5f83206c36..784a89658a 100644 --- a/src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala @@ -434,7 +434,7 @@ abstract class TypeParser { // java.lang.Number to get the value (if a number, not for boolean, character) // see ch.epfl.lamp.compiler.msil.util.PEStream.java def getConstant(constType: Type, value: Object): Constant = { - val typeClass = constType.symbol + val typeClass = constType.typeSymbol if (typeClass == definitions.BooleanClass) Constant(value.asInstanceOf[java.lang.Boolean].booleanValue) else if (typeClass == definitions.ByteClass) |