File tree 2 files changed +8
-2
lines changed
compiler/src/dotty/tools/dotc/typer 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ trait QuotesAndSplices {
109
109
if (ctx.mode.is(Mode .QuotedPattern )) patternOuterContext(ctx.outer) else ctx
110
110
val typedArgs = tree.args.map {
111
111
case arg : untpd.Ident =>
112
- typedExpr(arg)
112
+ withoutMode( Mode . ImplicitsEnabled )( typedExpr(arg) )
113
113
case arg =>
114
114
report.error(" Open pattern expected an identifier" , arg.srcPos)
115
115
EmptyTree
Original file line number Diff line number Diff line change @@ -4055,12 +4055,18 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4055
4055
case _ : SingletonType | _ : FunOrPolyProto => false
4056
4056
case _ => true
4057
4057
var resMatch : Boolean = false
4058
+ // println(i"adaptNoArgs: tree = ${tree}")
4059
+ // println(i"adaptNoArgs: ctx.mode = ${ctx.mode}")
4060
+ // println(i"adaptNoArgs: ptNorm = ${ptNorm}")
4061
+ // println(i"functionExpected = ${functionExpected}")
4062
+ // println(i"needsEta = ${needsEta}")
4058
4063
wtp match {
4059
4064
case wtp : ExprType =>
4060
4065
readaptSimplified(tree.withType(wtp.resultType))
4061
4066
case wtp : MethodType if wtp.isImplicitMethod &&
4067
+ ctx.mode.is(Mode .ImplicitsEnabled ) &&
4062
4068
({ resMatch = constrainResult(tree.symbol, wtp, sharpenedPt); resMatch } || ! functionExpected) =>
4063
- if (resMatch || ctx.mode.is( Mode . ImplicitsEnabled ) )
4069
+ if (resMatch)
4064
4070
adaptNoArgsImplicitMethod(wtp)
4065
4071
else
4066
4072
// Don't proceed with implicit search if result type cannot match - the search
You can’t perform that action at this time.
0 commit comments