diff options
author | Paul Phillips <paulp@improving.org> | 2011-09-05 00:11:29 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-09-05 00:11:29 +0000 |
commit | fa2deeb4304d149c4870cfb013e7790d6fe00d86 (patch) | |
tree | bf0bbd999592d412811f4647f1e94ad3c1165191 /src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala | |
parent | 6817244d64fca81810e6e45f8a4ea53e9e6d76c2 (diff) | |
download | scala-fa2deeb4304d149c4870cfb013e7790d6fe00d86.tar.gz scala-fa2deeb4304d149c4870cfb013e7790d6fe00d86.tar.bz2 scala-fa2deeb4304d149c4870cfb013e7790d6fe00d86.zip |
Offer warning when demonstrably non-side-effect...
Offer warning when demonstrably non-side-effecting expressions appear in
statement position, which should be unintentional by definition. Threw
in removal of six places with useless discarded expressions which the
warning informed me about. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala index 6c1245dd46..9eda2e4097 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala @@ -397,11 +397,9 @@ trait MarkupParsers { def xScalaPatterns: List[Tree] = escapeToScala(parser.seqPatterns(), "pattern") def reportSyntaxError(pos: Int, str: String) = parser.syntaxError(pos, str) - def reportSyntaxError(str: String) = { + def reportSyntaxError(str: String) { reportSyntaxError(curOffset, "in XML literal: " + str) - val result = ch - nextch - result + nextch() } /** '<' xPattern ::= Name [S] { xmlPattern | '{' pattern3 '}' } ETag |