File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,10 @@ 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
+ val tg = withoutMode(Mode.ImplicitsEnabled)(typedExpr(arg))
113
+ // println(i"tg = ${tg}")
114
+ // println(i"ctx.mode = ${ctx.mode}")
115
+ tg
113
116
case arg =>
114
117
report.error("Open pattern expected an identifier", arg.srcPos)
115
118
EmptyTree
Original file line number Diff line number Diff line change @@ -4055,12 +4055,17 @@ 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
- case wtp: MethodType if wtp.isImplicitMethod &&
4066
+ case wtp: MethodType if wtp.isImplicitMethod && ctx.mode.is(Mode.ImplicitsEnabled) &&
4062
4067
({ resMatch = constrainResult(tree.symbol, wtp, sharpenedPt); resMatch } || !functionExpected) =>
4063
- if (resMatch || ctx.mode.is(Mode.ImplicitsEnabled) )
4068
+ if (resMatch)
4064
4069
adaptNoArgsImplicitMethod(wtp)
4065
4070
else
4066
4071
// 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