File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -383,8 +383,9 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
383
383
/** new C(args), calling given constructor `constr` of C */
384
384
def New (tp : Type , constr : TermSymbol , args : List [Tree ])(implicit ctx : Context ): Apply = {
385
385
val targs = tp.argTypes
386
- New (tp withoutArgs targs)
387
- .select(TermRef .withSig(tp.normalizedPrefix, constr))
386
+ val tycon = tp.withoutArgs(targs)
387
+ New (tycon)
388
+ .select(TermRef .withSig(tycon, constr))
388
389
.appliedToTypes(targs)
389
390
.appliedToArgs(args)
390
391
}
@@ -818,15 +819,9 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
818
819
val alternatives = ctx.typer.resolveOverloaded(alts, proto, Nil )
819
820
assert(alternatives.size == 1 ) // this is parsed from bytecode tree. there's nothing user can do about it
820
821
821
- val prefixTpe =
822
- if (method eq nme.CONSTRUCTOR )
823
- receiver.tpe.normalizedPrefix // <init> methods are part of the enclosing scope
824
- else
825
- receiver.tpe
826
-
827
822
val selected = alternatives.head
828
823
val fun = receiver
829
- .select(TermRef .withSig(prefixTpe , selected.termSymbol.asTerm))
824
+ .select(TermRef .withSig(receiver.tpe , selected.termSymbol.asTerm))
830
825
.appliedToTypes(targs)
831
826
832
827
def adaptLastArg (lastParam : Tree , expectedType : Type ) = {
You can’t perform that action at this time.
0 commit comments