diff options
author | Martin Odersky <odersky@gmail.com> | 2003-07-31 09:57:59 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-07-31 09:57:59 +0000 |
commit | 03449ed20a3cca9e8d974c7efeff6b4e01ecb66d (patch) | |
tree | db1153ac4bffac098d6d6d053f727992f1a2e4da /sources/scalac/typechecker/RefCheck.java | |
parent | be21ca1267f48e8fd14d5e32f3c7a4d814005eef (diff) | |
download | scala-03449ed20a3cca9e8d974c7efeff6b4e01ecb66d.tar.gz scala-03449ed20a3cca9e8d974c7efeff6b4e01ecb66d.tar.bz2 scala-03449ed20a3cca9e8d974c7efeff6b4e01ecb66d.zip |
*** empty log message ***
Diffstat (limited to 'sources/scalac/typechecker/RefCheck.java')
-rw-r--r-- | sources/scalac/typechecker/RefCheck.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sources/scalac/typechecker/RefCheck.java b/sources/scalac/typechecker/RefCheck.java index 9cd8575c6b..3b5b9f7d78 100644 --- a/sources/scalac/typechecker/RefCheck.java +++ b/sources/scalac/typechecker/RefCheck.java @@ -395,7 +395,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { Symbol sym = null; switch (stat) { case ClassDef(_, _, _, _, _, _): - sym = stat.symbol().constructor(); + sym = stat.symbol().primaryConstructor(); break; case DefDef(_, _, _, _, _, _): case ModuleDef(_, _, _, _): @@ -403,7 +403,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { sym = stat.symbol(); } if (sym != null && sym.isLocal()) { - scopes[level].enter(sym); + scopes[level].enter(new Scope.Entry(sym, scopes[level])); symIndex.put(sym, new Integer(index)); } } @@ -522,7 +522,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { } private Tree[] caseFields(ClassSymbol clazz) { - Symbol[] vparams = clazz.constructor().type().firstParams(); + Symbol[] vparams = clazz.primaryConstructor().type().firstParams(); Tree[] fields = new Tree[vparams.length]; for (int i = 0; i < fields.length; i++) { fields[i] = gen.mkRef( @@ -874,12 +874,14 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { case Apply(Tree fn, Tree[] args): Symbol fsym = TreeInfo.methSymbol(fn); + assert fsym != Symbol.NONE : tree; if (fsym != null && fsym.isMethod() && !fsym.isConstructor() && (fsym.flags & CASE) != 0) { // convert case methods to new's - Symbol constr = fsym.type().resultType().symbol().constructor(); + Symbol constr = fsym.type().resultType().symbol().primaryConstructor(); tree = gen.New(toConstructor(tree, constr)); } + return super.transform(tree); case AppliedType(Tree tpe, Tree[] args): |