diff options
author | buraq <buraq@epfl.ch> | 2004-05-19 14:11:45 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-05-19 14:11:45 +0000 |
commit | 1b9da8e38cbe4bdc1cc81b9acad7bfb53069dcb8 (patch) | |
tree | 0d5b2fe878889e17da56dc2067b2856d4e38cc5c /sources/scalac/typechecker/RefCheck.java | |
parent | 7de863e85cb889c93e8b8e1dffd0297e2757f940 (diff) | |
download | scala-1b9da8e38cbe4bdc1cc81b9acad7bfb53069dcb8.tar.gz scala-1b9da8e38cbe4bdc1cc81b9acad7bfb53069dcb8.tar.bz2 scala-1b9da8e38cbe4bdc1cc81b9acad7bfb53069dcb8.zip |
fixed
Diffstat (limited to 'sources/scalac/typechecker/RefCheck.java')
-rw-r--r-- | sources/scalac/typechecker/RefCheck.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/scalac/typechecker/RefCheck.java b/sources/scalac/typechecker/RefCheck.java index e5c6ffe89c..8cdb4788cf 100644 --- a/sources/scalac/typechecker/RefCheck.java +++ b/sources/scalac/typechecker/RefCheck.java @@ -699,7 +699,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { Tree body; if( fields.length > 0) { // switch< n > int tags[] = new int[ fields.length ]; - int i = 0; while( i < fields.length ) { tags[i] = ++i; }; + int i = 0; while( i < fields.length ) { tags[i] = i; ++i; }; body = gen.Switch( gen.mkLocalRef( clazz.pos, seParam ), tags, fields, @@ -714,7 +714,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { private Tree numberOfElementsMethod( ClassSymbol clazz ) { Symbol seSym = clazz.newMethod( clazz.pos, OVERRIDE, Names.numberOfElements ); seSym.setInfo( - Type.MethodType( Symbol.EMPTY_ARRAY, defs.INT_TYPE() )); + Type.PolyType( Symbol.EMPTY_ARRAY, defs.INT_TYPE() )); clazz.info().members().enter( seSym ); Tree[] fields = caseFields( clazz ); return gen.DefDef(seSym, gen.mkIntLit( clazz.pos, fields.length )); |