Skip to content

Commit bdf895c

Browse files
committed
Fix crash: polymorphic function apply does not have symbols
dotc -d out -Ycheck-init tests/run/polymorphic-functions.scala
1 parent 7e3806e commit bdf895c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/src/dotty/tools/dotc/transform/init/Summarization.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ object Summarization {
4545
case Select(qualifier, name) =>
4646
val (pots, effs) = analyze(qualifier)
4747
if (env.ignoredMethods.contains(expr.symbol)) (Potentials.empty, effs)
48+
else if (!expr.symbol.exists) { // polymorphic function apply and structural types
49+
(Potentials.empty, pots.promote(expr) ++ effs)
50+
}
4851
else {
4952
val (pots2, effs2) = pots.select(expr.symbol, expr)
5053
(pots2, effs ++ effs2)

0 commit comments

Comments
 (0)