From b269c20a3fd543d5ad812828a634bfd26f912fe7 Mon Sep 17 00:00:00 2001 From: mihaylov Date: Fri, 13 Jul 2007 10:56:44 +0000 Subject: [PATCH] Synced dotnet library with rev 12294 git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@12297 5e8d7ff9-d8ef-0310-90f0-a4852d11357a --- .../scala/tools/nsc/backend/msil/GenMSIL.scala | 16 ++++++++-------- .../scala/tools/nsc/symtab/clr/TypeParser.scala | 2 +- src/dotnet-library/scala/Console.scala | 10 +++++----- src/dotnet-library/scala/compat/Math.scala | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala index 115eb8e7f..39c128d84 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 5f83206c3..784a89658 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) diff --git a/src/dotnet-library/scala/Console.scala b/src/dotnet-library/scala/Console.scala index 23d70cd08..7a9c20c03 100644 --- a/src/dotnet-library/scala/Console.scala +++ b/src/dotnet-library/scala/Console.scala @@ -66,7 +66,7 @@ object Console { * * @param out the new output stream. */ - def setOut(out: TextWriter): Unit = outVar.value = out + def setOut(out: TextWriter) { outVar.value = out } /** Set the default output stream for the duration * of execution of one thunk. @@ -109,7 +109,7 @@ object Console { * output (i.e. output not terminated by a new line character) has * to be made visible on the terminal. */ - def flush(): Unit = out.Flush() + def flush() { out.Flush() } /** Print a new line character on the terminal. */ @@ -130,16 +130,16 @@ object Console { * text. The arguments that are inserted into specific * locations in text are provided with parameter * args. See class java.text.MessageFormat + * class="java/text/MessageFormat">java.text.MessageFormat * for a full specification of the format syntax. + * class="java/util/Formatter">format syntax. *

* * @param text the format of the text to print out. * @param args the parameters used to instantiate the format. * @throws java.lang.IllegalArgumentException */ - def printf(text: String, args: Any*): Unit = format(text, args: _*) + def printf(text: String, args: Any*) { format(text, args: _*) } /** * @see scala.Math instead. */ @deprecated object Math {