summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/javac
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-11-11 01:36:12 +0000
committerPaul Phillips <paulp@improving.org>2011-11-11 01:36:12 +0000
commitf194a29a53d4383bd83f04cced3c382923f224d0 (patch)
tree101c4fed00adb70ff042c804f36d930cffdd37b6 /src/compiler/scala/tools/nsc/javac
parent042fdbc42a632e4b3b8510ff7638295e7aa3e981 (diff)
downloadscala-f194a29a53d4383bd83f04cced3c382923f224d0.tar.gz
scala-f194a29a53d4383bd83f04cced3c382923f224d0.tar.bz2
scala-f194a29a53d4383bd83f04cced3c382923f224d0.zip
Deprecated ambiguous dot syntaxes.
1.+(2) - what is it? Is it 3 or 3.0? Come scala 2.11 you won't have to not know (or even not know there's something you don't know.) 1.+(2) will then be safely considered equivalent to 1 + 2, because any dot not followed by a digit is not part of a number. Primarily, that's these forms: 3.f 3.d 3. If you prefer an error to a warning, use -Xfuture. Let's deprecate 012 == 10 too! (See comment.) References SI-5089, no review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/javac')
-rw-r--r--src/compiler/scala/tools/nsc/javac/JavaScanners.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/javac/JavaScanners.scala b/src/compiler/scala/tools/nsc/javac/JavaScanners.scala
index 5422fc1c9e..45b63b0ca0 100644
--- a/src/compiler/scala/tools/nsc/javac/JavaScanners.scala
+++ b/src/compiler/scala/tools/nsc/javac/JavaScanners.scala
@@ -919,6 +919,7 @@ trait JavaScanners extends ast.parser.ScannersCommon {
def warning(pos: Int, msg: String) = unit.warning(pos, msg)
def error (pos: Int, msg: String) = unit. error(pos, msg)
def incompleteInputError(pos: Int, msg: String) = unit.incompleteInputError(pos, msg)
+ def deprecationWarning(pos: Int, msg: String) = unit.deprecationWarning(pos, msg)
implicit def p2g(pos: Position): Int = if (pos.isDefined) pos.point else -1
implicit def g2p(pos: Int): Position = new OffsetPosition(unit.source, pos)
}