From f7d436a0abf350ff573f155392393c357f489a93 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 3 Dec 2011 15:05:25 -0800 Subject: Eliminated redundant error message. No secondary "reassignment to val" for unknown identifiers in assignment position. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index b969e9629f..16c0cb40ff 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3457,12 +3457,10 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { if (treeInfo.isVariableOrGetter(qual1)) { stopTimer(failedOpEqNanos, opeqStart) convertToAssignment(fun, qual1, name, args, ex) - } else { + } + else { stopTimer(failedApplyNanos, appStart) - if ((qual1.symbol ne null) && qual1.symbol.isValue) - error(tree.pos, "reassignment to val") - else - reportTypeError(fun.pos, ex) + reportTypeError(fun.pos, ex) setError(tree) } case _ => -- cgit v1.2.3