Skip to content

Commit 2a681ec

Browse files
committed
Fix to Select(Tree, Symbol)
As a denotation need to take the symbol's info *as seen from the qualifier type*.
1 parent b4b688d commit 2a681ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
3030

3131
def Select(qualifier: Tree, sym: Symbol)(implicit ctx: Context): Select =
3232
untpd.Select(qualifier, sym.name).withType(
33-
TermRef.withSig(qualifier.tpe, sym.name.asTermName, sym.signature, sym.denot))
33+
TermRef.withSig(qualifier.tpe, sym.name.asTermName, sym.signature, sym.denot.asSeenFrom(qualifier.tpe)))
3434

3535
def SelectWithSig(qualifier: Tree, name: Name, sig: Signature)(implicit ctx: Context) =
3636
untpd.SelectWithSig(qualifier, name, sig)

0 commit comments

Comments
 (0)