diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index d3847de894..80785cee2f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3935,9 +3935,14 @@ trait Typers extends Modes with Adaptations with Tags { case t: ValOrDefDef => t.rhs case t => t } - val (outer, explicitTargs) = cxTree1 match { + val cxTree2 = cxTree1 match { + case Typed(t, tpe) => t // ignore outer type annotation + case t => t + } + val (outer, explicitTargs) = cxTree2 match { case TypeApply(fun, targs) => (fun, targs) case Apply(TypeApply(fun, targs), args) => (Apply(fun, args), targs) + case Select(TypeApply(fun, targs), nme) => (Select(fun, nme), targs) case t => (t, Nil) } def hasNamedArg(as: List[Tree]) = as.collectFirst{case AssignOrNamedArg(lhs, rhs) =>}.nonEmpty |