File tree 1 file changed +3
-1
lines changed
compiler/src/dotty/tools/dotc/transform
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -392,10 +392,12 @@ class TreeChecker extends Phase with SymTransformer {
392
392
393
393
// Polymorphic apply methods stay structural until Erasure
394
394
val isPolyFunctionApply = (tree.name eq nme.apply) && tree.qualifier.typeOpt.derivesFrom(defn.PolyFunctionClass )
395
+ // Erased functions stay structural until Erasure
396
+ val isErasedFunctionApply = (tree.name eq nme.apply) && tree.qualifier.typeOpt.derivesFrom(defn.ErasedFunctionClass )
395
397
// Outer selects are pickled specially so don't require a symbol
396
398
val isOuterSelect = tree.name.is(OuterSelectName )
397
399
val isPrimitiveArrayOp = ctx.erasedTypes && nme.isPrimitiveName(tree.name)
398
- if ! (tree.isType || isPolyFunctionApply || isOuterSelect || isPrimitiveArrayOp) then
400
+ if ! (tree.isType || isPolyFunctionApply || isErasedFunctionApply || isOuterSelect || isPrimitiveArrayOp) then
399
401
val denot = tree.denot
400
402
assert(denot.exists, i " Selection $tree with type $tpe does not have a denotation " )
401
403
assert(denot.symbol.exists, i " Denotation $denot of selection $tree with type $tpe does not have a symbol, qualifier type = ${tree.qualifier.typeOpt}" )
You can’t perform that action at this time.
0 commit comments