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 {
707
707
val alternatives = ctx.typer.resolveOverloaded(alts, proto, Nil )
708
708
assert(alternatives.size == 1 ) // this is parsed from bytecode tree. there's nothing user can do about it
709
709
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
+
710
716
val selected = alternatives.head
711
717
val fun = receiver
712
- .select(TermRef .withSig(receiver.tpe.normalizedPrefix , selected.termSymbol.asTerm))
718
+ .select(TermRef .withSig(prefixTpe , selected.termSymbol.asTerm))
713
719
.appliedToTypes(targs)
714
720
715
721
def adaptLastArg (lastParam : Tree , expectedType : Type ) = {
You can’t perform that action at this time.
0 commit comments