summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Scanners.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 787dde541d..104f53eb4d 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1130,7 +1130,7 @@ self =>
private def stringOp(t: Tree, op: TermName) = {
val str = in.strVal
in.nextToken()
- if (str.isEmpty) t
+ if (str.length == 0) t
else atPos(t.pos.startOrPoint) {
Apply(Select(t, op), List(Literal(Constant(str))))
}
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
index 89384b8801..c642af5dd7 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
@@ -599,7 +599,7 @@ trait Scanners extends ScannersCommon {
getLitChars('}', '"', ' ', '\t')
if (ch == '}') {
setStrVal()
- if (!strVal.isEmpty) strVal = "%" + strVal
+ if (strVal.length > 0) strVal = "%" + strVal
token = STRINGFMT
} else {
syntaxError("unclosed format string")