summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2013-06-27 22:09:38 +0200
committerSimon Ochsenreither <simon@ochsenreither.de>2013-06-28 01:26:06 +0200
commit6b1654834fdb03ba73d7f9fad7b0735024e0d688 (patch)
tree3778104239eb0c12b1e13d83a6c3ef11a91d35fe /src
parent040830d87f7f6ceb2815b9c69f0679ba6b30753d (diff)
downloadscala-6b1654834fdb03ba73d7f9fad7b0735024e0d688.tar.gz
scala-6b1654834fdb03ba73d7f9fad7b0735024e0d688.tar.bz2
scala-6b1654834fdb03ba73d7f9fad7b0735024e0d688.zip
SI-7620 Remove floating-point-literals-without-digit-after-dot
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Scanners.scala11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
index 2dca39f7a3..9e9c47f401 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
@@ -939,9 +939,8 @@ trait Scanners extends ScannersCommon {
}
if (value > limit)
syntaxError("floating point number too large")
- if (isDeprecatedForm) {
- deprecationWarning("This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.")
- }
+ if (isDeprecatedForm)
+ syntaxError("floating point number is missing digit after dot")
if (negated) -value else value
} catch {
@@ -997,10 +996,8 @@ trait Scanners extends ScannersCommon {
val lookahead = lookaheadReader
val c = lookahead.getc()
- /* As of scala 2.11, it isn't a number unless c here is a digit, so
- * settings.future.value excludes the rest of the logic.
- */
- if (settings.future && !isDigit(c))
+ /* Prohibit 1. */
+ if (!isDigit(c))
return setStrVal()
val isDefinitelyNumber = (c: @switch) match {