diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-03 15:05:25 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-03 15:28:37 -0800 |
commit | f7d436a0abf350ff573f155392393c357f489a93 (patch) | |
tree | a9a040212724c8f42db1e4daa4e2388829944b59 /src | |
parent | 3d7c75089eae06b3d439ff1acd8bba5a189463da (diff) | |
download | scala-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')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 8 |
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 _ => |