@@ -1060,20 +1060,21 @@ abstract class Erasure extends InfoTransform
1060
1060
}
1061
1061
else if (args.isEmpty && interceptedMethods(fn.symbol)) {
1062
1062
if (poundPoundMethods.contains(fn.symbol)) {
1063
+ val qual1 = preErase(qual)
1063
1064
// This is unattractive, but without it we crash here on ().## because after
1064
1065
// erasure the ScalaRunTime.hash overload goes from Unit => Int to BoxedUnit => Int.
1065
1066
// This must be because some earlier transformation is being skipped on ##, but so
1066
1067
// far I don't know what. For null we now define null.## == 0.
1067
1068
def staticsCall (methodName : TermName ): Tree = {
1068
- val newTree = gen.mkMethodCall(RuntimeStaticsModule , methodName, qual :: Nil )
1069
+ val newTree = gen.mkMethodCall(RuntimeStaticsModule , methodName, qual1 :: Nil )
1069
1070
global.typer.typed(newTree)
1070
1071
}
1071
1072
1072
- qual .tpe.typeSymbol match {
1073
- case UnitClass | NullClass => LIT (0 )
1074
- case IntClass => qual
1075
- case s @ (ShortClass | ByteClass | CharClass ) => numericConversion(qual , s)
1076
- case BooleanClass => If (qual , LIT (true .## ), LIT (false .## ))
1073
+ qual1 .tpe.typeSymbol match {
1074
+ case UnitClass | NullClass => BLOCK (qual1, LIT (0 ) )
1075
+ case IntClass => qual1
1076
+ case s @ (ShortClass | ByteClass | CharClass ) => numericConversion(qual1 , s)
1077
+ case BooleanClass => If (qual1 , LIT (true .## ), LIT (false .## ))
1077
1078
case LongClass => staticsCall(nme.longHash)
1078
1079
case FloatClass => staticsCall(nme.floatHash)
1079
1080
case DoubleClass => staticsCall(nme.doubleHash)
0 commit comments