Skip to content

Commit de1b715

Browse files
dwijnandWojciechMazur
authored andcommitted
Handle eta-expanded type exports
[Cherry-picked 4e532e9]
1 parent a25c33f commit de1b715

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ object Symbols extends SymUtils {
313313
else if (denot.is(ModuleVal))
314314
this.moduleClass.sourceSymbol // The module val always has a zero-extent position
315315
else if denot.is(ExportedType) then
316-
denot.info.dropAlias.asInstanceOf[NamedType].symbol.sourceSymbol
316+
denot.info.dropAlias.finalResultType.typeConstructor match
317+
case tp: NamedType => tp.symbol.sourceSymbol
318+
case _ => this
317319
else if (denot.is(Synthetic)) {
318320
val linked = denot.linkedClass
319321
if (linked.exists && !linked.is(Synthetic))

0 commit comments

Comments
 (0)