This commit fixes the result of x.isInstanceOf[C] where x is a primitive and C is an ancestor of the hijacked class for x.
For jl.Number, which is the only non-Object class that is an ancestor of a hijacked class, we add a special case in the codegen.
For interfaces, we add generic code in their genInstanceTest function, based on their specialInstanceTypes.
This means we have a second place where we need to compute specialInstanceTypes. We move it to the preprocessor, and also use it to generically compute isAncestorOfHijackedClass. This removes the hard-code set that we had before.
This commit fixes the result of
x.isInstanceOf[C]
wherex
is a primitive andC
is an ancestor of the hijacked class forx
.For
jl.Number
, which is the only non-Object
class that is an ancestor of a hijacked class, we add a special case in the codegen.For interfaces, we add generic code in their
genInstanceTest
function, based on theirspecialInstanceTypes
.This means we have a second place where we need to compute
specialInstanceTypes
. We move it to the preprocessor, and also use it to generically computeisAncestorOfHijackedClass
. This removes the hard-code set that we had before.Fix #74. Fix #84. Fix #92.