From cac4c47b3a412c4e77b02c49f1698ac93b89fe9d Mon Sep 17 00:00:00 2001 From: mihaylov Date: Tue, 17 Apr 2007 13:42:07 +0000 Subject: Discard BoxedNumber with -target:msil --- src/compiler/scala/tools/nsc/symtab/Definitions.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala index d36eb507cb..a2051c5acc 100644 --- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala +++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala @@ -849,7 +849,7 @@ trait Definitions requires SymbolTable { PatternWildcard = NoSymbol.newValue(NoPos, "_").setInfo(AllClass.typeConstructor) - BoxedNumberClass = getClass("scala.runtime.BoxedNumber") + BoxedNumberClass = if (forMSIL) null else getClass("scala.runtime.BoxedNumber") BoxedArrayClass = getClass("scala.runtime.BoxedArray") BoxedAnyArrayClass = getClass("scala.runtime.BoxedAnyArray") BoxedObjectArrayClass = getClass("scala.runtime.BoxedObjectArray") diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index f4577bac74..cfb4c3e270 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -503,7 +503,7 @@ abstract class RefChecks extends InfoTransform { nonSensible("", false) else if (isNumericValueClass(receiver) && !isNumericValueClass(actual) && - !(actual isSubClass BoxedNumberClass) && + !(forMSIL || (actual isSubClass BoxedNumberClass)) && !(receiver isSubClass actual)) nonSensible("", false) else if ((receiver hasFlag FINAL) && hasObjectEquals && !isValueClass(receiver) && -- cgit v1.2.3