diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-05-01 15:24:17 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-05-01 15:24:17 +0000 |
commit | 374bd7f7b064482eb8ca6ee0b513f89c11e31acc (patch) | |
tree | 313a6dc7e8251d40d52e531fa71b06463f85c010 /src | |
parent | 570bb834c388537cebf049c5b30901866a978646 (diff) | |
download | scala-374bd7f7b064482eb8ca6ee0b513f89c11e31acc.tar.gz scala-374bd7f7b064482eb8ca6ee0b513f89c11e31acc.tar.bz2 scala-374bd7f7b064482eb8ca6ee0b513f89c11e31acc.zip |
Fix for #773.
Problem was calling incompleteInputError multiple times would escalate
the problem to be treated as a "real" error. This does not appear to be
the correct semantics. Tried to fix this up as best as possible, but
Sean needs to investigate the implications for the Eclipse plugin.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilationUnits.scala | 5 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala index 68f5793a8b..2d2b849c90 100644 --- a/src/compiler/scala/tools/nsc/CompilationUnits.scala +++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala @@ -65,11 +65,8 @@ trait CompilationUnits { self: Global => def incompleteInputError(pos: Position, msg:String) = if (inIDE || !(errorPositions contains pos)) { - val hadErrors = !errorPositions.isEmpty - if (!hadErrors) - reporter.incompleteInputError((pos), msg) - else reporter.error((pos), msg) if (!inIDE) errorPositions += pos + reporter.incompleteInputError((pos), msg) } override def toString() = source.toString() diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 00d16ffc01..78af57b191 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -256,6 +256,8 @@ trait Parsers extends NewScanners with MarkupParsers { syntaxError(inCurrentPos, msg, skipIt) } // unused. + /* Commented out because the comment says it is unused. + Probably eliminate eventually. GAW 2008.05.01 def mismatch(expected: Int, found: Int) { val posToReport = this.posToReport val msg = @@ -267,6 +269,7 @@ trait Parsers extends NewScanners with MarkupParsers { else syntaxError(posToReport, msg, true) } + */ /** Consume one token of the specified type, or * signal an error if it is not there. |