File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -707,9 +707,15 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
707707 val alternatives = ctx.typer.resolveOverloaded(alts, proto, Nil )
708708 assert(alternatives.size == 1 ) // this is parsed from bytecode tree. there's nothing user can do about it
709709
710+ val prefixTpe =
711+ if (method eq nme.CONSTRUCTOR )
712+ receiver.tpe.normalizedPrefix // <init> methods are part of the enclosing scope
713+ else
714+ receiver.tpe
715+
710716 val selected = alternatives.head
711717 val fun = receiver
712- .select(TermRef .withSig(receiver.tpe.normalizedPrefix , selected.termSymbol.asTerm))
718+ .select(TermRef .withSig(prefixTpe , selected.termSymbol.asTerm))
713719 .appliedToTypes(targs)
714720
715721 def adaptLastArg (lastParam : Tree , expectedType : Type ) = {
You can’t perform that action at this time.
0 commit comments