diff options
author | mihaylov <mihaylov@epfl.ch> | 2004-06-23 14:42:59 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2004-06-23 14:42:59 +0000 |
commit | 8d57fd5731d0a671edce1bb8ea9a1bb1cdc56b60 (patch) | |
tree | f33955f17b9d7cc8e991559cc423b3c994c9d0cb /sources/scalac/typechecker/RefCheck.java | |
parent | fee5e824a97dfcd285901550a979c1360eca962b (diff) | |
download | scala-8d57fd5731d0a671edce1bb8ea9a1bb1cdc56b60.tar.gz scala-8d57fd5731d0a671edce1bb8ea9a1bb1cdc56b60.tar.bz2 scala-8d57fd5731d0a671edce1bb8ea9a1bb1cdc56b60.zip |
[MSIL] In the auto-generated hashCode for case ...
[MSIL] In the auto-generated hashCode for case classes use
System.Object.GetType, rather than java.lang.Object.getClass
Diffstat (limited to 'sources/scalac/typechecker/RefCheck.java')
-rw-r--r-- | sources/scalac/typechecker/RefCheck.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/scalac/typechecker/RefCheck.java b/sources/scalac/typechecker/RefCheck.java index 5239a4d68a..cb0ac3be5b 100644 --- a/sources/scalac/typechecker/RefCheck.java +++ b/sources/scalac/typechecker/RefCheck.java @@ -614,7 +614,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { private Symbol getMember(Type site, Name name) { Symbol sym = site.lookupNonPrivate(name); - assert sym.kind == VAL; + assert sym.kind == VAL : Debug.show(sym) + "; " + Debug.show(site) + "::" + name; return sym; } @@ -811,7 +811,9 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { .setInfo(defs.ANY_HASHCODE.type()); clazz.info().members().enter(hashCodeSym); Tree[] fields = caseFields(clazz); - Symbol getClassMethod = getNullaryMemberMethod(clazz.type(), Names.getClass); + Name name = global.target == Global.TARGET_MSIL + ? Names.GetType : Names.getClass; + Symbol getClassMethod = getNullaryMemberMethod(clazz.type(), name); Symbol addMethod = getUnaryMemberMethod( defs.int_TYPE(), Names.ADD, defs.int_TYPE()); Symbol mulMethod = getUnaryMemberMethod( |