Skip to content

Commit

Permalink
Adapt infos of export default getters to qualifier
Browse files Browse the repository at this point in the history
Fixes #14953
  • Loading branch information
odersky committed Apr 18, 2022
1 parent 53f5531 commit fb5f380
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/typer/Namer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,8 @@ class Namer { typer: Typer =>
buf += ddef.withSpan(span)
if hasDefaults then
foreachDefaultGetterOf(sym.asTerm,
getter => addForwarder(getter.name.asTermName, getter, span))
getter => addForwarder(
getter.name.asTermName, getter.asSeenFrom(path.tpe), span))
end addForwarder

def addForwardersNamed(name: TermName, alias: TermName, span: Span): Unit =
Expand Down
8 changes: 8 additions & 0 deletions tests/pos/i14953.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
object Test{

val xs: Seq[String] = List("Apple", "Orange", "Pear")
export xs.*

}

val _ = Test.head

0 comments on commit fb5f380

Please sign in to comment.