From 8eba9acbc49eb02b9b5bd8523873a181255e4bb6 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 29 Nov 2011 18:10:55 +0000 Subject: Fixed -Xfuture 5.ds, deprecated 0-octal. I messed up my trip to the future the first time around; now in the future 5.f is not an error but an attempt to call method "f" on 5 like nature intended. (Thank you simon for catching this.) And deprecated leading 0 for octal. Closes SI-5205. --- test/files/neg/ambiguous-float-dots.check | 11 +++++++---- test/files/neg/ambiguous-float-dots.scala | 7 ++++++- test/files/neg/ambiguous-float-dots2.check | 18 ++++++------------ test/files/neg/ambiguous-float-dots2.scala | 7 ++++++- 4 files changed, 25 insertions(+), 18 deletions(-) (limited to 'test/files/neg') diff --git a/test/files/neg/ambiguous-float-dots.check b/test/files/neg/ambiguous-float-dots.check index d1e71543f1..6c21056d7a 100644 --- a/test/files/neg/ambiguous-float-dots.check +++ b/test/files/neg/ambiguous-float-dots.check @@ -1,13 +1,16 @@ ambiguous-float-dots.scala:2: error: 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. val x0 = 5. ^ -ambiguous-float-dots.scala:3: error: 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. +ambiguous-float-dots.scala:6: error: 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. val x1 = 5.f ^ -ambiguous-float-dots.scala:6: error: 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. +ambiguous-float-dots.scala:7: error: Treating numbers with a leading zero as octal is deprecated. + val y0 = 055 + ^ +ambiguous-float-dots.scala:11: error: 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. 1.+(2) ^ -ambiguous-float-dots.scala:7: error: 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. +ambiguous-float-dots.scala:12: error: 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. 1. + 2 ^ -four errors found +5 errors found diff --git a/test/files/neg/ambiguous-float-dots.scala b/test/files/neg/ambiguous-float-dots.scala index 58cc1b70be..87e948db35 100644 --- a/test/files/neg/ambiguous-float-dots.scala +++ b/test/files/neg/ambiguous-float-dots.scala @@ -1,9 +1,14 @@ class A { val x0 = 5. +} + +class B { val x1 = 5.f val y0 = 055 +} +class D { 1.+(2) 1. + 2 1 + 2 -} \ No newline at end of file +} diff --git a/test/files/neg/ambiguous-float-dots2.check b/test/files/neg/ambiguous-float-dots2.check index 613601a1b2..5270d888c9 100644 --- a/test/files/neg/ambiguous-float-dots2.check +++ b/test/files/neg/ambiguous-float-dots2.check @@ -1,13 +1,7 @@ -ambiguous-float-dots2.scala:2: error: malformed floating point number: to be part of a number, a dot must be immediately followed by a digit - val x0 = 5. - ^ -ambiguous-float-dots2.scala:6: error: malformed floating point number: to be part of a number, a dot must be immediately followed by a digit - 1.+(2) - ^ -ambiguous-float-dots2.scala:7: error: malformed floating point number: to be part of a number, a dot must be immediately followed by a digit +ambiguous-float-dots2.scala:3: error: identifier expected but '}' found. +} +^ +ambiguous-float-dots2.scala:12: error: ';' expected but integer literal found. 1. + 2 - ^ -ambiguous-float-dots2.scala:3: error: ';' expected but 'val' found. - val x1 = 5.f - ^ -four errors found + ^ +two errors found diff --git a/test/files/neg/ambiguous-float-dots2.scala b/test/files/neg/ambiguous-float-dots2.scala index 58cc1b70be..87e948db35 100644 --- a/test/files/neg/ambiguous-float-dots2.scala +++ b/test/files/neg/ambiguous-float-dots2.scala @@ -1,9 +1,14 @@ class A { val x0 = 5. +} + +class B { val x1 = 5.f val y0 = 055 +} +class D { 1.+(2) 1. + 2 1 + 2 -} \ No newline at end of file +} -- cgit v1.2.3