diff options
author | paltherr <paltherr@epfl.ch> | 2003-04-30 11:05:27 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-04-30 11:05:27 +0000 |
commit | a9e68909d6a40bd1dd9ee4e89f0f0a2e891fe243 (patch) | |
tree | 294d01ce942ec7e0eff571d417af82afee479a88 | |
parent | 81a8fae3a68f020355b7bfbc30c34d69508d1b03 (diff) | |
download | scala-a9e68909d6a40bd1dd9ee4e89f0f0a2e891fe243.tar.gz scala-a9e68909d6a40bd1dd9ee4e89f0f0a2e891fe243.tar.bz2 scala-a9e68909d6a40bd1dd9ee4e89f0f0a2e891fe243.zip |
- Fixed type of main method
-rw-r--r-- | sources/scala/tools/scalai/EntryPointCompiler.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sources/scala/tools/scalai/EntryPointCompiler.java b/sources/scala/tools/scalai/EntryPointCompiler.java index 4ad414597f..9a54aea781 100644 --- a/sources/scala/tools/scalai/EntryPointCompiler.java +++ b/sources/scala/tools/scalai/EntryPointCompiler.java @@ -14,6 +14,7 @@ import scalac.Unit; import scalac.ast.Tree; import scalac.ast.parser.Sourcefile; import scalac.symtab.Type; +import scalac.symtab.TypeTags; import scalac.symtab.Symbol; import scalac.util.Debug; import scalac.util.Name; @@ -38,8 +39,10 @@ public class EntryPointCompiler { this.global = global; Name ARGS_N = Name.fromString("args"); Symbol args = new TermSymbol(0, ARGS_N, null, 0); - args.setInfo(global.definitions.arrayType(global.definitions.STRING_TYPE)); - this.MAIN_TYPE = Type.MethodType(new Symbol[] {args}, global.definitions.UNIT_TYPE).erasure(); + args.setInfo( + Type.UnboxedArrayType(global.definitions.JAVA_STRING_TYPE)); + this.MAIN_TYPE = Type.MethodType( + new Symbol[] {args}, Type.UnboxedType(TypeTags.UNIT)); } //######################################################################## @@ -68,7 +71,7 @@ public class EntryPointCompiler { Name name = Compiler.MAIN_N; Type type = MAIN_TYPE; - Symbol method = getMethod(module, name, type.erasure()); + Symbol method = getMethod(module, name, type); if (method == Symbol.NONE) { error("module '" + main + "' has no method '" + name + "'"); return; |