From ac7dc3c10243af1bb3affb0ffb0a369b9b1bfeaa Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Mon, 8 Feb 2010 15:37:34 +0000 Subject: fix msil build (nested classes in particular). --- .../ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/msil/ch') 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 84fd2a4023..2c0ab29b90 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala @@ -141,14 +141,19 @@ class TypeBuilder (module: Module, attributes: Int, fullName: String, baseType: /** Searches for the nested type with the specified name. */ override def GetNestedType(name: String): Type = { - testRaw(name) - return super.GetNestedType(name) + testRaw(name) + super.GetNestedType(name) } /** Returns all the types nested within the current Type. */ override def GetNestedTypes(): Array[Type] = { - testRaw("") - return super.GetNestedTypes() + testRaw("") + super.GetNestedTypes() + } + + /** Returns a Type object that represents a one-dimensional array of the current type */ + def MakeArrayType(): Type = { + Type.mkArray(this, 1) } /** Sets a custom attribute. */ @@ -184,8 +189,7 @@ class TypeBuilder (module: Module, attributes: Int, fullName: String, baseType: // i.e. not finalized by call to CreateType protected def testRaw(member: String) { if (raw) - throw new RuntimeException - ("Not supported for TypeBuilder before CreateType(): " + + throw new RuntimeException("Not supported for TypeBuilder before CreateType(): " + FullName + "::" + member) } -- cgit v1.2.3