summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-12-03 15:05:25 -0800
committerPaul Phillips <paulp@improving.org>2011-12-03 15:28:37 -0800
commitf7d436a0abf350ff573f155392393c357f489a93 (patch)
treea9a040212724c8f42db1e4daa4e2388829944b59 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent3d7c75089eae06b3d439ff1acd8bba5a189463da (diff)
downloadscala-f7d436a0abf350ff573f155392393c357f489a93.tar.gz
scala-f7d436a0abf350ff573f155392393c357f489a93.tar.bz2
scala-f7d436a0abf350ff573f155392393c357f489a93.zip
Eliminated redundant error message.
No secondary "reassignment to val" for unknown identifiers in assignment position.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala8
1 files changed, 3 insertions, 5 deletions
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 _ =>