File tree 1 file changed +9
-3
lines changed
src/dotty/tools/dotc/typer
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1458,9 +1458,15 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1458
1458
// have influenced the context, binding variables, but later ones
1459
1459
// might fail. In that case the constraint needs to be reset.
1460
1460
ctx.typerState.constraint = constr
1461
- tryEither
1462
- { implicit ctx => typed(untpd.Apply (untpd.TypedSplice (tree), Nil ), pt) }
1463
- { (_, _) => ctx.error(failure(), tree.pos.endPos); tree }
1461
+ def issueError = {
1462
+ ctx.error(failure(), tree.pos.endPos)
1463
+ tree
1464
+ }
1465
+ if (tree.symbol.hasDefaultParams)
1466
+ tryEither
1467
+ { implicit ctx => typed(untpd.Apply (untpd.TypedSplice (tree), Nil ), pt) }
1468
+ { (_, _) => issueError }
1469
+ else issueError
1464
1470
}
1465
1471
}
1466
1472
if ((pt eq WildcardType ) || original.isEmpty) addImplicitArgs
You can’t perform that action at this time.
0 commit comments