diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/ambiguous-float-dots.check | 13 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots.flags | 1 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots.scala | 9 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots2.check | 13 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots2.flags | 1 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots2.scala | 9 |
6 files changed, 46 insertions, 0 deletions
diff --git a/test/files/neg/ambiguous-float-dots.check b/test/files/neg/ambiguous-float-dots.check new file mode 100644 index 0000000000..d1e71543f1 --- /dev/null +++ b/test/files/neg/ambiguous-float-dots.check @@ -0,0 +1,13 @@ +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. + 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. + 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. + 1. + 2 + ^ +four errors found diff --git a/test/files/neg/ambiguous-float-dots.flags b/test/files/neg/ambiguous-float-dots.flags new file mode 100644 index 0000000000..65faf53579 --- /dev/null +++ b/test/files/neg/ambiguous-float-dots.flags @@ -0,0 +1 @@ +-Xfatal-warnings -deprecation
\ No newline at end of file diff --git a/test/files/neg/ambiguous-float-dots.scala b/test/files/neg/ambiguous-float-dots.scala new file mode 100644 index 0000000000..58cc1b70be --- /dev/null +++ b/test/files/neg/ambiguous-float-dots.scala @@ -0,0 +1,9 @@ +class A { + val x0 = 5. + val x1 = 5.f + val y0 = 055 + + 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 new file mode 100644 index 0000000000..613601a1b2 --- /dev/null +++ b/test/files/neg/ambiguous-float-dots2.check @@ -0,0 +1,13 @@ +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 + 1. + 2 + ^ +ambiguous-float-dots2.scala:3: error: ';' expected but 'val' found. + val x1 = 5.f + ^ +four errors found diff --git a/test/files/neg/ambiguous-float-dots2.flags b/test/files/neg/ambiguous-float-dots2.flags new file mode 100644 index 0000000000..112fc720a0 --- /dev/null +++ b/test/files/neg/ambiguous-float-dots2.flags @@ -0,0 +1 @@ +-Xfuture
\ No newline at end of file diff --git a/test/files/neg/ambiguous-float-dots2.scala b/test/files/neg/ambiguous-float-dots2.scala new file mode 100644 index 0000000000..58cc1b70be --- /dev/null +++ b/test/files/neg/ambiguous-float-dots2.scala @@ -0,0 +1,9 @@ +class A { + val x0 = 5. + val x1 = 5.f + val y0 = 055 + + 1.+(2) + 1. + 2 + 1 + 2 +}
\ No newline at end of file |