@@ -4937,17 +4937,16 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
4937
4937
dyna.wrapErrors(t, (_.typed1(t, mode, pt)))
4938
4938
}
4939
4939
4940
- val sym = tree.symbol orElse member(qual, name) orElse inCompanionForJavaStatic(qual.tpe.prefix, qual.symbol, name) orElse {
4940
+ val sym = tree.symbol orElse member(qual, name) orElse inCompanionForJavaStatic(qual.tpe.prefix, qual.symbol, name)
4941
+ if ((sym eq NoSymbol ) && name != nme.CONSTRUCTOR && mode.inAny(EXPRmode | PATTERNmode )) {
4941
4942
// symbol not found? --> try to convert implicitly to a type that does have the required
4942
4943
// member. Added `| PATTERNmode` to allow enrichment in patterns (so we can add e.g., an
4943
4944
// xml member to StringContext, which in turn has an unapply[Seq] method)
4944
- if (name != nme.CONSTRUCTOR && mode.inAny(EXPRmode | PATTERNmode )) {
4945
- val qual1 = adaptToMemberWithArgs(tree, qual, name, mode)
4946
- if ((qual1 ne qual) && ! qual1.isErrorTyped)
4947
- return typed(treeCopy.Select (tree, qual1, name), mode, pt)
4948
- }
4949
- NoSymbol
4945
+ val qual1 = adaptToMemberWithArgs(tree, qual, name, mode)
4946
+ if ((qual1 ne qual) && ! qual1.isErrorTyped)
4947
+ return typed(treeCopy.Select (tree, qual1, name), mode, pt)
4950
4948
}
4949
+
4951
4950
if (phase.erasedTypes && qual.isInstanceOf [Super ] && tree.symbol != NoSymbol )
4952
4951
qual setType tree.symbol.owner.tpe
4953
4952
0 commit comments