Skip to content

Commit d48c520

Browse files
committed
Fix transformation of TypeApply in the specialised case
Widening the type of the function is necessary before checking for parameterlessness of the methods.
1 parent 0964663 commit d48c520

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/TypeSpecializer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class TypeSpecializer extends MiniPhaseTransform with InfoTransformer {
344344

345345
override def transformTypeApply(tree: tpd.TypeApply)(implicit ctx: Context, info: TransformerInfo): Tree = {
346346
val TypeApply(fun, _) = tree
347-
if (fun.tpe.isParameterless) rewireTree(tree)
347+
if (fun.tpe.widenDealias.isParameterless) rewireTree(tree)
348348
else tree
349349
}
350350

0 commit comments

Comments
 (0)