diff options
author | Paul Phillips <paulp@improving.org> | 2009-11-18 22:06:03 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-11-18 22:06:03 +0000 |
commit | ae024cebd4a41339039f3df91c8aa4a02522594f (patch) | |
tree | 07c5e3a27ce4636f76eb73fe43353fc6c6aa0362 | |
parent | 536955e1afd68ac6f99f0347fa14a58ab47cb958 (diff) | |
download | scala-ae024cebd4a41339039f3df91c8aa4a02522594f.tar.gz scala-ae024cebd4a41339039f3df91c8aa4a02522594f.tar.bz2 scala-ae024cebd4a41339039f3df91c8aa4a02522594f.zip |
Finally completed the incredibly tedious task o...
Finally completed the incredibly tedious task of removing the lower case
primitive aliases from Predef. Had to rebuild msil.jar along the way.
38 files changed, 135 insertions, 155 deletions
diff --git a/lib/msil.jar.desired.sha1 b/lib/msil.jar.desired.sha1 index f549276d22..8854c2de16 100644 --- a/lib/msil.jar.desired.sha1 +++ b/lib/msil.jar.desired.sha1 @@ -1 +1 @@ -c2013bd09dda83cddafe6552fcb2b1630e5b9b4e ?msil.jar +df54e06ffe8574a2d45e51227713a76a74945b34 ?msil.jar diff --git a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala index e128b4e12f..be00805732 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala @@ -193,15 +193,6 @@ abstract class TreeInfo { reserved addEntry nme.false_ reserved addEntry nme.true_ reserved addEntry nme.null_ - reserved addEntry newTypeName("byte") - reserved addEntry newTypeName("char") - reserved addEntry newTypeName("short") - reserved addEntry newTypeName("int") - reserved addEntry newTypeName("long") - reserved addEntry newTypeName("float") - reserved addEntry newTypeName("double") - reserved addEntry newTypeName("boolean") - reserved addEntry newTypeName("unit") /** Is name a variable name? */ def isVariableName(name: Name): Boolean = { diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 892e90d581..e37de9afac 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -25,17 +25,6 @@ object Predef extends LowPriorityImplicits { */ def classOf[T]: Class[T] = null - // aliases ------------------------------------------------------------ - @deprecated("lower-case type aliases will be removed") type byte = scala.Byte - @deprecated("lower-case type aliases will be removed") type short = scala.Short - @deprecated("lower-case type aliases will be removed") type char = scala.Char - @deprecated("lower-case type aliases will be removed") type int = scala.Int - @deprecated("lower-case type aliases will be removed") type long = scala.Long - @deprecated("lower-case type aliases will be removed") type float = scala.Float - @deprecated("lower-case type aliases will be removed") type double = scala.Double - @deprecated("lower-case type aliases will be removed") type boolean = scala.Boolean - @deprecated("lower-case type aliases will be removed") type unit = scala.Unit - type String = java.lang.String type Class[T] = java.lang.Class[T] diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/AssemblyBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/AssemblyBuilder.scala index 9fbfbb533b..834b2b3a74 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/AssemblyBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/AssemblyBuilder.scala @@ -72,7 +72,7 @@ class AssemblyBuilder(name: AssemblyName) } /** Sets a custom attribute. */ - def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) { + def SetCustomAttribute(constr: ConstructorInfo, value: Array[Byte]) { addCustomAttribute(constr, value) } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ConstructorBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ConstructorBuilder.scala index ad3a82d040..cfb54844c9 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ConstructorBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ConstructorBuilder.scala @@ -21,7 +21,7 @@ import java.io.IOException * @author Nikolay Mihaylov * @version 1.0 */ -class ConstructorBuilder(declType: Type, attrs: int, paramTypes: Array[Type]) +class ConstructorBuilder(declType: Type, attrs: Int, paramTypes: Array[Type]) extends ConstructorInfo(declType, attrs, paramTypes) with ICustomAttributeSetter with Visitable @@ -31,7 +31,7 @@ class ConstructorBuilder(declType: Type, attrs: int, paramTypes: Array[Type]) // public interface /** Defines a parameter of this constructor. */ - def DefineParameter(pos: int, attr: int, name: String): ParameterBuilder = { + def DefineParameter(pos: Int, attr: Int, name: String): ParameterBuilder = { val param = new ParameterBuilder(name, params(pos).ParameterType, attr, pos) params(pos) = param return param diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/FieldBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/FieldBuilder.scala index 1fc3e068b8..1306148975 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/FieldBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/FieldBuilder.scala @@ -18,7 +18,7 @@ import java.io.IOException * @author Nikolay Mihaylov * @version 1.0 */ -class FieldBuilder(name: String, declType: Type, attrs: int, fieldType: Type) +class FieldBuilder(name: String, declType: Type, attrs: Int, fieldType: Type) extends FieldInfo(name, declType, attrs, fieldType) with ICustomAttributeSetter with Visitable diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ICustomAttributeSetter.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ICustomAttributeSetter.scala index c19366cc33..88587a143d 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ICustomAttributeSetter.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ICustomAttributeSetter.scala @@ -15,5 +15,5 @@ import ch.epfl.lamp.compiler.msil.ConstructorInfo * @version 1.0 */ trait ICustomAttributeSetter { - def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) + def SetCustomAttribute(constr: ConstructorInfo, value: Array[Byte]) } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala index 28d0f7787a..4644cade72 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala @@ -52,7 +52,7 @@ abstract class ILPrinterVisitor extends Visitor { private var newline = true // print types without or with members? - protected var nomembers: boolean = false + protected var nomembers: Boolean = false // external assemblies protected var as: Array[Assembly] = null @@ -90,13 +90,13 @@ abstract class ILPrinterVisitor extends Visitor { // methods to print code protected def print(s: String) { align(); out.print(s)} protected def print(o: Object) { align(); out.print(o) } - protected def print(c: char) { align(); out.print(c) } - protected def print(`val`: int) { align(); out.print(`val`)} - protected def print(`val`: long){ align(); out.print(`val`)} + protected def print(c: Char) { align(); out.print(c) } + protected def print(`val`: Int) { align(); out.print(`val`)} + protected def print(`val`: Long){ align(); out.print(`val`)} protected def println() { out.println(); newline = true; padding = 0 } - protected def println(c: char) { print(c); println() } - protected def println(i: int) { print(i); println() } - protected def println(l: long) { print(l); println() } + protected def println(c: Char) { print(c); println() } + protected def println(i: Int) { print(i); println() } + protected def println(l: Long) { print(l); println() } protected def println(s: String){ print(s); println() } protected def println(o: Object){ print(o); println() } protected def printName(name: String) { @@ -489,7 +489,7 @@ abstract class ILPrinterVisitor extends Visitor { //########################################################################## - def printAssemblySignature(assem: Assembly, extern: boolean) { + def printAssemblySignature(assem: Assembly, extern: Boolean) { print(".assembly ") if (extern) print("extern ") diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala index e22c1fca13..eb86c96de5 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala @@ -45,7 +45,7 @@ class MethodBuilder(name: String, declType: Type, attrs: Int, returnType: Type, } /** Sets a custom attribute. */ - def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) { + def SetCustomAttribute(constr: ConstructorInfo, value: Array[Byte]) { addCustomAttribute(constr, value) } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ModuleBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ModuleBuilder.scala index 037b8660ee..5b42d6df76 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ModuleBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ModuleBuilder.scala @@ -105,7 +105,7 @@ class ModuleBuilder(name: String, fullname: String, scopeName: String, assembly: } /** Sets a custom attribute. */ - def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) { + def SetCustomAttribute(constr: ConstructorInfo, value: Array[Byte]) { addCustomAttribute(constr, value) } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala index e7bff447cc..1bd8e48633 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala @@ -23,23 +23,23 @@ class OpCode extends Visitable { var CEE_string: String = _ /** The type of Microsoft intermediate language (MSIL) instruction. */ - var CEE_code: short = _ + var CEE_code: Short = _ /** How the Microsoft intermediate language (MSIL) instruction pops the stack. */ - var CEE_pop: byte = _ + var CEE_pop: Byte = _ /** How the Microsoft intermediate language (MSIL) instruction pushes operand onto the stack. */ - var CEE_push: byte = _ + var CEE_push: Byte = _ /** Describes the type of flow control. */ - var CEE_flow: byte = _ + var CEE_flow: Byte = _ /** ????? */ - var CEE_inline: byte = _ + var CEE_inline: Byte = _ - var CEE_length: byte = _ + var CEE_length: Byte = _ - var CEE_popush: byte = _ + var CEE_popush: Byte = _ /** * the apply method for a visitor @@ -49,13 +49,13 @@ class OpCode extends Visitable { v.caseOpCode(this) } - protected def length(): byte = { + protected def length(): Byte = { val code = OpCode.length(CEE_code) val inline = OpCode.INLINE_length(CEE_inline) return if(inline < 0) { -1 } else { (code + inline).toByte } } - protected def popush(): byte = { + protected def popush(): Byte = { val pop = OpCode.POP_size(CEE_pop) val push = OpCode.PUSH_size(CEE_push) return if(pop < 0 || push < 0) { OpCode.POPUSH_SPECIAL } else { (push - pop).toByte } @@ -391,27 +391,27 @@ object OpCode { //######################################################################## // Opcode's amount and type of poped data - final val POP_NONE : byte = 0x00 - final val POP_1 : byte = 0x01 - final val POP_1_1 : byte = 0x02 - final val POP_I : byte = 0x03 - final val POP_I_1 : byte = 0x04 - final val POP_I_I : byte = 0x05 - final val POP_I_I8 : byte = 0x06 - final val POP_I_R4 : byte = 0x07 - final val POP_I_R8 : byte = 0x08 - final val POP_I_I_I : byte = 0x09 - final val POP_REF : byte = 0x0A - final val POP_REF_1 : byte = 0x0B - final val POP_REF_I : byte = 0x0C - final val POP_REF_I_I : byte = 0x0D - final val POP_REF_I_I8 : byte = 0x0E - final val POP_REF_I_R4 : byte = 0x0F - final val POP_REF_I_R8 : byte = 0x10 - final val POP_REF_I_REF : byte = 0x11 - final val POP_SPECIAL : byte = 0x12 + final val POP_NONE : Byte = 0x00 + final val POP_1 : Byte = 0x01 + final val POP_1_1 : Byte = 0x02 + final val POP_I : Byte = 0x03 + final val POP_I_1 : Byte = 0x04 + final val POP_I_I : Byte = 0x05 + final val POP_I_I8 : Byte = 0x06 + final val POP_I_R4 : Byte = 0x07 + final val POP_I_R8 : Byte = 0x08 + final val POP_I_I_I : Byte = 0x09 + final val POP_REF : Byte = 0x0A + final val POP_REF_1 : Byte = 0x0B + final val POP_REF_I : Byte = 0x0C + final val POP_REF_I_I : Byte = 0x0D + final val POP_REF_I_I8 : Byte = 0x0E + final val POP_REF_I_R4 : Byte = 0x0F + final val POP_REF_I_R8 : Byte = 0x10 + final val POP_REF_I_REF : Byte = 0x11 + final val POP_SPECIAL : Byte = 0x12 final val POP_count : Int = 0x13 - final val POP_size : Array[byte] = new Array[byte](POP_count) + final val POP_size : Array[Byte] = new Array[Byte](POP_count) POP_size(POP_NONE) = 0 POP_size(POP_1) = 1 @@ -436,17 +436,17 @@ object OpCode { //######################################################################## // Opcode's amount and type of pushed data - final val PUSH_NONE : byte = 0x00 - final val PUSH_1 : byte = 0x01 - final val PUSH_1_1 : byte = 0x02 - final val PUSH_I : byte = 0x03 - final val PUSH_I8 : byte = 0x04 - final val PUSH_R4 : byte = 0x05 - final val PUSH_R8 : byte = 0x06 - final val PUSH_REF : byte = 0x07 - final val PUSH_SPECIAL : byte = 0x08 + final val PUSH_NONE : Byte = 0x00 + final val PUSH_1 : Byte = 0x01 + final val PUSH_1_1 : Byte = 0x02 + final val PUSH_I : Byte = 0x03 + final val PUSH_I8 : Byte = 0x04 + final val PUSH_R4 : Byte = 0x05 + final val PUSH_R8 : Byte = 0x06 + final val PUSH_REF : Byte = 0x07 + final val PUSH_SPECIAL : Byte = 0x08 final val PUSH_count : Int = 0x09 - final val PUSH_size : Array[byte] = new Array[byte](PUSH_count) + final val PUSH_size : Array[Byte] = new Array[Byte](PUSH_count) PUSH_size(PUSH_NONE) = 0 PUSH_size(PUSH_1) = 1 @@ -461,30 +461,30 @@ object OpCode { //######################################################################## // Opcode's amount of moved data - final val POPUSH_SPECIAL : byte = -128 + final val POPUSH_SPECIAL : Byte = -128 //######################################################################## // Opcode's inline argument types - final val INLINE_NONE : byte = 0x00 - final val INLINE_VARIABLE_S : byte = 0x01 - final val INLINE_TARGET_S : byte = 0x02 - final val INLINE_I_S : byte = 0x03 - final val INLINE_VARIABLE : byte = 0x04 - final val INLINE_TARGET : byte = 0x05 - final val INLINE_I : byte = 0x06 - final val INLINE_I8 : byte = 0x07 - final val INLINE_R : byte = 0x08 - final val INLINE_R8 : byte = 0x09 - final val INLINE_STRING : byte = 0x0A - final val INLINE_TYPE : byte = 0x0B - final val INLINE_FIELD : byte = 0x0C - final val INLINE_METHOD : byte = 0x0D - final val INLINE_SIGNATURE : byte = 0x0E - final val INLINE_TOKEN : byte = 0x0F - final val INLINE_SWITCH : byte = 0x10 + final val INLINE_NONE : Byte = 0x00 + final val INLINE_VARIABLE_S : Byte = 0x01 + final val INLINE_TARGET_S : Byte = 0x02 + final val INLINE_I_S : Byte = 0x03 + final val INLINE_VARIABLE : Byte = 0x04 + final val INLINE_TARGET : Byte = 0x05 + final val INLINE_I : Byte = 0x06 + final val INLINE_I8 : Byte = 0x07 + final val INLINE_R : Byte = 0x08 + final val INLINE_R8 : Byte = 0x09 + final val INLINE_STRING : Byte = 0x0A + final val INLINE_TYPE : Byte = 0x0B + final val INLINE_FIELD : Byte = 0x0C + final val INLINE_METHOD : Byte = 0x0D + final val INLINE_SIGNATURE : Byte = 0x0E + final val INLINE_TOKEN : Byte = 0x0F + final val INLINE_SWITCH : Byte = 0x10 final val INLINE_count : Int = 0x11 - final val INLINE_length : Array[byte] = new Array[byte](INLINE_count) + final val INLINE_length : Array[Byte] = new Array[Byte](INLINE_count) INLINE_length(INLINE_NONE) = 0 INLINE_length(INLINE_VARIABLE_S) = 1 @@ -507,21 +507,21 @@ object OpCode { //######################################################################## // Opcode's control flow implications - final val FLOW_META : byte = 0x00 - final val FLOW_NEXT : byte = 0x01 - final val FLOW_BRANCH : byte = 0x02 - final val FLOW_COND_BRANCH : byte = 0x03 - final val FLOW_BREAK : byte = 0x04 - final val FLOW_CALL : byte = 0x05 - final val FLOW_RETURN : byte = 0x06 - final val FLOW_THROW : byte = 0x07 + final val FLOW_META : Byte = 0x00 + final val FLOW_NEXT : Byte = 0x01 + final val FLOW_BRANCH : Byte = 0x02 + final val FLOW_COND_BRANCH : Byte = 0x03 + final val FLOW_BREAK : Byte = 0x04 + final val FLOW_CALL : Byte = 0x05 + final val FLOW_RETURN : Byte = 0x06 + final val FLOW_THROW : Byte = 0x07 final val FLOW_count : Int = 0x08 //######################################################################## // Init methods for Opcode - def opcode(that: OpCode, opcode: int, string: String, code: Int, - pop: byte, push: byte, inline: byte, flow: byte) { + def opcode(that: OpCode, opcode: Int, string: String, code: Int, + pop: Byte, push: Byte, inline: Byte, flow: Byte) { that.CEE_opcode = opcode that.CEE_string = string that.CEE_code = code.toShort @@ -533,7 +533,7 @@ object OpCode { that.CEE_popush = that.popush() } - def length(code: Int): byte = { + def length(code: Int): Byte = { if ((code & 0xFFFFFF00) == 0xFFFFFF00) return 1 if ((code & 0xFFFFFF00) == 0xFFFFFE00) return 2 return 0 @@ -1862,7 +1862,7 @@ object OpCode { /** * Allocates a certain number of bytes from the local dynamic memory pool and pushes the - * address (a transient pointer, type *) of the first allocated byte onto the evaluation stack. + * address (a transient pointer, type *) of the first allocated Byte onto the evaluation stack. */ final val Localloc = new OpCode() opcode(Localloc, CEE_LOCALLOC, "localloc" , 0xFFFFFE0F, POP_I, PUSH_I, INLINE_NONE, FLOW_NEXT) diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala index 57ef69ba7f..f8e0f140a8 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala @@ -1135,7 +1135,7 @@ object OpCodes { /** * Allocates a certain number of bytes from the local dynamic memory pool and pushes the - * address (a transient pointer, type *) of the first allocated byte onto the evaluation stack. + * address (a transient pointer, type *) of the first allocated Byte onto the evaluation stack. */ final val Localloc = OpCode.Localloc diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ParameterBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ParameterBuilder.scala index dabba58f0c..5a68f8f0ae 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ParameterBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ParameterBuilder.scala @@ -29,7 +29,7 @@ class ParameterBuilder(name: String, tpe: Type, attr: Int, pos: Int) //########################################################################## /** Sets a custom attribute. */ - def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) { + def SetCustomAttribute(constr: ConstructorInfo, value: Array[Byte]) { addCustomAttribute(constr, value) } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala index 81bf28bc04..84fd2a4023 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala @@ -18,7 +18,7 @@ import java.io.IOException * @author Nikolay Mihaylov * @version 1.0 */ -class TypeBuilder (module: Module, attributes: int, fullName: String, baseType: Type, interfaces: Array[Type], declType: Type) +class TypeBuilder (module: Module, attributes: Int, fullName: String, baseType: Type, interfaces: Array[Type], declType: Type) extends Type(module, attributes, fullName, baseType, interfaces, declType, 0) with ICustomAttributeSetter with Visitable @@ -45,7 +45,7 @@ class TypeBuilder (module: Module, attributes: int, fullName: String, baseType: * Adds a new field to the class, with the given name, * attributes and field type. */ - def DefineField(name: String, `type`: Type, attrs: short): FieldBuilder = { + def DefineField(name: String, `type`: Type, attrs: Short): FieldBuilder = { val field: FieldBuilder = new FieldBuilder(name, this, attrs, `type`) fieldBuilders.add(field) return field @@ -55,7 +55,7 @@ class TypeBuilder (module: Module, attributes: int, fullName: String, baseType: * Adds a new method to the class, with the given name and * method signature. */ - def DefineMethod(name: String, attrs: short, returnType: Type, paramTypes: Array[Type]): MethodBuilder = { + def DefineMethod(name: String, attrs: Short, returnType: Type, paramTypes: Array[Type]): MethodBuilder = { val method = new MethodBuilder(name, this, attrs, returnType, paramTypes) val methods = methodBuilders.iterator() while(methods.hasNext()) { @@ -72,7 +72,7 @@ class TypeBuilder (module: Module, attributes: int, fullName: String, baseType: * Adds a new constructor to the class, with the given attributes * and signature. */ - def DefineConstructor(attrs: short, callingConvention: short, paramTypes: Array[Type]): ConstructorBuilder = { + def DefineConstructor(attrs: Short, callingConvention: Short, paramTypes: Array[Type]): ConstructorBuilder = { val constr = new ConstructorBuilder(this, attrs, paramTypes) constructorBuilders.add(constr) return constr @@ -81,7 +81,7 @@ class TypeBuilder (module: Module, attributes: int, fullName: String, baseType: /** * Defines a nested type given its name. */ - def DefineNestedType(name: String, attributes: int, baseType: Type, interfaces: Array[Type]): TypeBuilder = { + def DefineNestedType(name: String, attributes: Int, baseType: Type, interfaces: Array[Type]): TypeBuilder = { val nested = nestedTypeBuilders.iterator() while(nested.hasNext()) { val nt = nested.next().asInstanceOf[TypeBuilder] @@ -152,11 +152,11 @@ class TypeBuilder (module: Module, attributes: int, fullName: String, baseType: } /** Sets a custom attribute. */ - def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) { + def SetCustomAttribute(constr: ConstructorInfo, value: Array[Byte]) { addCustomAttribute(constr, value) } - def setPosition(sourceLine: int, sourceFilename: String) { + def setPosition(sourceLine: Int, sourceFilename: String) { this.sourceLine = sourceLine this.sourceFilename = sourceFilename } @@ -213,7 +213,7 @@ object TypeBuilder { return s.toString() } - def methodsEqual(m1: MethodInfo, m2: MethodInfo): boolean = { + def methodsEqual(m1: MethodInfo, m2: MethodInfo): Boolean = { if (!m1.Name.equals(m2.Name)) return false if (m1.ReturnType != m2.ReturnType) diff --git a/test/files/neg/bug563.scala b/test/files/neg/bug563.scala index d8e026e656..624b83b1fa 100644 --- a/test/files/neg/bug563.scala +++ b/test/files/neg/bug563.scala @@ -1,7 +1,7 @@ object Test { def map[A,R](a : List[A], f : A => R) : List[R] = a.map(f); - def split(sn : Iterable[List[Cell[int]]]) : unit = + def split(sn : Iterable[List[Cell[Int]]]) : Unit = for (n <- sn) map(n,ptr => new Cell(ptr.elem)); } diff --git a/test/files/neg/bug700.check b/test/files/neg/bug700.check index 33a67e5094..5c2854069c 100644 --- a/test/files/neg/bug700.check +++ b/test/files/neg/bug700.check @@ -1,4 +1,4 @@ bug700.scala:6: error: method foobar in trait Foo is accessed from super. It may not be abstract unless it is overridden by a member declared `abstract' and `override' - def foobar: unit = super.foobar + def foobar: Unit = super.foobar ^ one error found diff --git a/test/files/neg/bug700.scala b/test/files/neg/bug700.scala index 7477bb54f6..b08c8b5529 100644 --- a/test/files/neg/bug700.scala +++ b/test/files/neg/bug700.scala @@ -3,7 +3,7 @@ trait Foo { } trait Bar extends Foo { - def foobar: unit = super.foobar + def foobar: Unit = super.foobar } // the following definition breaks the compiler diff --git a/test/files/neg/bug910.check b/test/files/neg/bug910.check index fe4ad4fca4..2bc2d986fa 100644 --- a/test/files/neg/bug910.check +++ b/test/files/neg/bug910.check @@ -1,6 +1,6 @@ bug910.scala:4: error: type mismatch; found : Seq[Char] - required: scala.Seq[int] - val y: Seq[int] = rest + required: scala.Seq[Int] + val y: Seq[Int] = rest ^ one error found diff --git a/test/files/neg/bug910.scala b/test/files/neg/bug910.scala index 2f28ea408f..540ee7001d 100644 --- a/test/files/neg/bug910.scala +++ b/test/files/neg/bug910.scala @@ -1,7 +1,7 @@ object RegExpTest1 extends Application { def co(x: Seq[Char]) = x match { case Seq('s','c','a','l','a', rest @ _*) => - val y: Seq[int] = rest + val y: Seq[Int] = rest y } } diff --git a/test/files/neg/constrs.check b/test/files/neg/constrs.check index 3524709785..4f4a12bc13 100644 --- a/test/files/neg/constrs.check +++ b/test/files/neg/constrs.check @@ -8,7 +8,7 @@ constrs.scala:10: error: called constructor's definition must precede calling co def this() = this("abc") ^ constrs.scala:12: error: called constructor's definition must precede calling constructor's definition - def this(x: boolean) = this(x) + def this(x: Boolean) = this(x) ^ constrs.scala:16: error: type mismatch; found : Int(1) diff --git a/test/files/neg/constrs.scala b/test/files/neg/constrs.scala index 969f593a2d..016df098f0 100644 --- a/test/files/neg/constrs.scala +++ b/test/files/neg/constrs.scala @@ -9,7 +9,7 @@ object test { class Foo(x: Int) { def this() = this("abc") def this(x: String) = this(1) - def this(x: boolean) = this(x) + def this(x: Boolean) = this(x) } class Bar[a](x: a) { diff --git a/test/files/neg/gadts1.scala b/test/files/neg/gadts1.scala index 67aef4f2d9..07200ff7aa 100644 --- a/test/files/neg/gadts1.scala +++ b/test/files/neg/gadts1.scala @@ -1,8 +1,8 @@ object Test{ abstract class Number -case class Int(n: int) extends Number -case class Double(d: double) extends Number +case class Int(n: scala.Int) extends Number +case class Double(d: scala.Double) extends Number trait Term[+a] case class Cell[a](var x: a) extends Term[a] @@ -10,7 +10,7 @@ case class NumTerm(val n: Number) extends Term[Number] class IntTerm(n: Int) extends NumTerm(n) with Term[Int] -def f[a](t:Term[a], c:Cell[a]): unit = +def f[a](t:Term[a], c:Cell[a]): Unit = t match { case NumTerm(n) => c.x = Double(1.0) } @@ -18,7 +18,7 @@ def f[a](t:Term[a], c:Cell[a]): unit = val x:Term[Number] = NumTerm(Int(5)) -def main(args: Array[String]): unit = { +def main(args: Array[String]): Unit = { val cell = Cell[Int](Int(6)) Console.println(cell) f[Int](new IntTerm(Int(5)), cell) diff --git a/test/files/neg/implicits.check b/test/files/neg/implicits.check index d94e1f27f2..337560f423 100644 --- a/test/files/neg/implicits.check +++ b/test/files/neg/implicits.check @@ -3,7 +3,7 @@ implicits.scala:21: error: type mismatch; required: ?{val +: ?} Note that implicit conversions are not applicable because they are ambiguous: both method any2plus in object Sub of type (x: Any)Sub.Plus - and method pos2int in object Super of type (p: Pos)int + and method pos2int in object Super of type (p: Pos)Int are possible conversion functions from Pos to ?{val +: ?} f(p+1) ^ diff --git a/test/files/neg/implicits.scala b/test/files/neg/implicits.scala index be85029660..846591e22d 100644 --- a/test/files/neg/implicits.scala +++ b/test/files/neg/implicits.scala @@ -3,7 +3,7 @@ class Pos class Super object Super { - implicit def pos2int(p: Pos): int = 0 + implicit def pos2int(p: Pos): Int = 0 } object Sub extends Super { @@ -17,7 +17,7 @@ object Test { import Super._ import Sub._ val p = new Pos - def f(x: int): int = x + def f(x: Int): Int = x f(p+1) } diff --git a/test/files/neg/overload.check b/test/files/neg/overload.check index 0faa97adb1..abfabaf3f2 100644 --- a/test/files/neg/overload.check +++ b/test/files/neg/overload.check @@ -1,6 +1,6 @@ overload.scala:10: error: ambiguous reference to overloaded definition, both method f in class D of type (x: Any)Unit -and method f in class C of type (x: int)Unit +and method f in class C of type (x: Int)Unit match argument types (Int) (new D).f(1) ^ diff --git a/test/files/neg/overload.scala b/test/files/neg/overload.scala index 311ea3874b..6ad911e90e 100644 --- a/test/files/neg/overload.scala +++ b/test/files/neg/overload.scala @@ -1,5 +1,5 @@ class C { - def f(x: int) {} + def f(x: Int) {} } class D extends C { diff --git a/test/files/neg/t0218.scala b/test/files/neg/t0218.scala index 282e85e814..319be82a7a 100644 --- a/test/files/neg/t0218.scala +++ b/test/files/neg/t0218.scala @@ -6,7 +6,7 @@ trait APQ { type PP = P - def pq(numQueens: int, numRows: int) : List[Placement] = { + def pq(numQueens: Int, numRows: Int) : List[Placement] = { List(new PP) } } diff --git a/test/files/neg/viewtest.scala b/test/files/neg/viewtest.scala index 778e672d91..5e7d624d23 100644 --- a/test/files/neg/viewtest.scala +++ b/test/files/neg/viewtest.scala @@ -12,13 +12,13 @@ trait Ordered[+a] { */ def compareTo [b >: a <% Ordered[b]](that: b): Int - def < [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) < 0 + def < [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) < 0 - def > [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) > 0 + def > [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) > 0 - def <= [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) <= 0 + def <= [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) <= 0 - def >= [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) >= 0 + def >= [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) >= 0 } @@ -30,9 +30,9 @@ object O { case _ => -(y compareTo x) } } - implicit def view2(x: char): Ordered[char] = new Ordered[char] { - def compareTo [b >: char <% Ordered[b]](y: b): Int = y match { - case y1: char => x - y1 + implicit def view2(x: Char): Ordered[Char] = new Ordered[Char] { + def compareTo [b >: Char <% Ordered[b]](y: b): Int = y match { + case y1: Char => x - y1 case _ => -(y compareTo x) } } @@ -106,7 +106,7 @@ object Test { Console.println(t.elements) } { - var t: Tree[List[char]] = Empty + var t: Tree[List[Char]] = Empty for (s <- args) { t = t insert toCharList(s) } diff --git a/test/files/pos/bug0091.scala b/test/files/pos/bug0091.scala index 54c821b41c..d491b7cfb9 100644 --- a/test/files/pos/bug0091.scala +++ b/test/files/pos/bug0091.scala @@ -1,6 +1,6 @@ class Bug { def main(args: Array[String]) = { var msg: String = null; // no bug if "null" instead of "_" - val f: PartialFunction[Any, unit] = { case 42 => msg = "coucou" }; + val f: PartialFunction[Any, Unit] = { case 42 => msg = "coucou" }; } } diff --git a/test/files/pos/bug1075.scala b/test/files/pos/bug1075.scala index 936ef72272..0f518b24db 100644 --- a/test/files/pos/bug1075.scala +++ b/test/files/pos/bug1075.scala @@ -5,7 +5,7 @@ class Directory(var dir_ : String) } dir_ = dir_.replaceAll("/{2,}", "/") - def this(serialized : Array[byte]) = { + def this(serialized : Array[Byte]) = { this(new String(serialized, "UTF-8")) } diff --git a/test/files/pos/bug287.scala b/test/files/pos/bug287.scala index 81a01951b2..8e5e8831c1 100644 --- a/test/files/pos/bug287.scala +++ b/test/files/pos/bug287.scala @@ -1,7 +1,7 @@ object testBuf { class mystream extends java.io.BufferedOutputStream(new java.io.FileOutputStream("/dev/null")) { def w( x:String ):Unit = { - val foo = new Array[byte](2); + val foo = new Array[Byte](2); // write( byte[] ) is defined in FilterOutputStream, the superclass of BufferedOutputStream super.write( foo ); // error diff --git a/test/files/pos/nested2.scala b/test/files/pos/nested2.scala index 302688a0ef..421ea6facf 100644 --- a/test/files/pos/nested2.scala +++ b/test/files/pos/nested2.scala @@ -5,5 +5,5 @@ class C[A] { object Test { val x = new C[String] - val y: C[String]#D[int] = new x.D[int] + val y: C[String]#D[Int] = new x.D[Int] } diff --git a/test/files/pos/switchUnbox.scala b/test/files/pos/switchUnbox.scala index a97bff5521..4f5467de29 100644 --- a/test/files/pos/switchUnbox.scala +++ b/test/files/pos/switchUnbox.scala @@ -2,7 +2,7 @@ // that contains -Xsqueeze:on // object Foo { - var xyz: (int, String) = (1, "abc") + var xyz: (Int, String) = (1, "abc") xyz._1 match { case 1 => Console.println("OK") case 2 => Console.println("OK") diff --git a/test/files/pos/t1164.scala b/test/files/pos/t1164.scala index 3acda88ba9..b238bf54d9 100644 --- a/test/files/pos/t1164.scala +++ b/test/files/pos/t1164.scala @@ -15,7 +15,7 @@ object test { // Try the same thing as above but use function as arguemnt to Bar // constructor - type FunIntToA [a] = (int) => a + type FunIntToA [a] = (Int) => a class Bar[a] (var f: FunIntToA[a]) object Bar { diff --git a/test/files/run/Course-2002-09.scala b/test/files/run/Course-2002-09.scala index fac39e0841..384a91efd8 100644 --- a/test/files/run/Course-2002-09.scala +++ b/test/files/run/Course-2002-09.scala @@ -81,7 +81,7 @@ class Constant(q: Quantity, v: Double) extends Constraint { class Probe(name: String, q: Quantity) extends Constraint { def newValue: Unit = printProbe(q.getValue); def dropValue: Unit = printProbe(None); - private def printProbe(v: Option[double]) { + private def printProbe(v: Option[Double]) { val vstr = v match { case Some(x) => x.toString() case None => "?" @@ -103,7 +103,7 @@ class Quantity() { if (v != v1) error("Error! contradiction: " + v + " and " + v1); case None => informant = setter; value = Some(v); - for (val c <- constraints; !(c == informant)) { + for (c <- constraints; if !(c == informant)) { c.newValue; } } @@ -112,7 +112,7 @@ class Quantity() { def forgetValue(retractor: Constraint): Unit = { if (retractor == informant) { value = None; - for (val c <- constraints; !(c == informant)) c.dropValue; + for (c <- constraints; if !(c == informant)) c.dropValue; } } def forgetValue: Unit = forgetValue(NoConstraint); @@ -258,7 +258,7 @@ object M2 { }; } - def show(x: Option[int], y: Option[Int], z: Option[int]) = { + def show(x: Option[Int], y: Option[Int], z: Option[Int]) = { Console.print("a = " +set(a,x)+ ", b = " +set(b,y)+ ", c = " +set(c,z)); Console.println(" => " + a.str + " * " + b.str + " = " + c.str); a.forgetValue; b.forgetValue; c.forgetValue; diff --git a/test/files/run/bug627.scala b/test/files/run/bug627.scala index 6415694ffe..ecaf150741 100644 --- a/test/files/run/bug627.scala +++ b/test/files/run/bug627.scala @@ -1,6 +1,6 @@ object Test { def main(args: Array[String]) { - val s: Seq[int] = Array(1, 2, 3, 4) + val s: Seq[Int] = Array(1, 2, 3, 4) println(s) } } diff --git a/test/files/run/unapply.scala b/test/files/run/unapply.scala index 72a4b0ac64..acbce58d35 100644 --- a/test/files/run/unapply.scala +++ b/test/files/run/unapply.scala @@ -111,7 +111,7 @@ object StreamFoo extends TestCase("unapply for Streams") with Assert { case Stream.cons(hd, tl) => hd + sum(tl) } override def runTest { - val str: Stream[int] = Stream.fromIterator(List(1,2,3).iterator) + val str: Stream[Int] = Stream.fromIterator(List(1,2,3).iterator) assertEquals(sum(str), 6) } } diff --git a/test/files/run/unapplyArray.scala b/test/files/run/unapplyArray.scala index bf6582dadf..bf7c9e2300 100644 --- a/test/files/run/unapplyArray.scala +++ b/test/files/run/unapplyArray.scala @@ -1,7 +1,7 @@ object Test { def main(args:Array[String]): Unit = { val z = Array(1,2,3,4) - val zs: Seq[int] = z + val zs: Seq[Int] = z val za: Any = z /* |