diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-06-20 20:00:53 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-06-20 20:00:53 -0700 |
commit | 0ebdc586ca347b2ced5a26bd0f91203228859b01 (patch) | |
tree | e79d8a211cdaf46fbfc941bd35f77c4ee184aec8 /test/files/neg | |
parent | e2aaf80aea2fc1a2ebc6f9a91163b346cb9882ee (diff) | |
parent | 36da62238be6efd92f2e59d9df6a4b29c4c7dae7 (diff) | |
download | scala-0ebdc586ca347b2ced5a26bd0f91203228859b01.tar.gz scala-0ebdc586ca347b2ced5a26bd0f91203228859b01.tar.bz2 scala-0ebdc586ca347b2ced5a26bd0f91203228859b01.zip |
Merge pull request #2342 from soc/SI-7292
SI-7292 Deprecate octal escape literals
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t7292-deprecation.check | 12 | ||||
-rw-r--r-- | test/files/neg/t7292-deprecation.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t7292-deprecation.scala | 5 | ||||
-rw-r--r-- | test/files/neg/t7292-removal.check | 10 | ||||
-rw-r--r-- | test/files/neg/t7292-removal.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t7292-removal.scala | 5 |
6 files changed, 34 insertions, 0 deletions
diff --git a/test/files/neg/t7292-deprecation.check b/test/files/neg/t7292-deprecation.check new file mode 100644 index 0000000000..c7e6111962 --- /dev/null +++ b/test/files/neg/t7292-deprecation.check @@ -0,0 +1,12 @@ +t7292-deprecation.scala:2: warning: Octal escape literals are deprecated, use /u0000 instead. + val chr1 = '/0' + ^ +t7292-deprecation.scala:3: warning: Octal escape literals are deprecated, use /u0053 instead. + val str1 = "abc/123456" + ^ +t7292-deprecation.scala:4: warning: Octal escape literals are deprecated, use /n instead. + val lf = '/012' + ^ +error: No warnings can be incurred under -Xfatal-warnings. +three warnings found +one error found diff --git a/test/files/neg/t7292-deprecation.flags b/test/files/neg/t7292-deprecation.flags new file mode 100644 index 0000000000..7de3c0f3ee --- /dev/null +++ b/test/files/neg/t7292-deprecation.flags @@ -0,0 +1 @@ +-Xfatal-warnings -deprecation diff --git a/test/files/neg/t7292-deprecation.scala b/test/files/neg/t7292-deprecation.scala new file mode 100644 index 0000000000..d857f0e1ec --- /dev/null +++ b/test/files/neg/t7292-deprecation.scala @@ -0,0 +1,5 @@ +object OctalEscapes { + val chr1 = '\0' + val str1 = "abc\123456" + val lf = '\012' +} diff --git a/test/files/neg/t7292-removal.check b/test/files/neg/t7292-removal.check new file mode 100644 index 0000000000..fffd0a1104 --- /dev/null +++ b/test/files/neg/t7292-removal.check @@ -0,0 +1,10 @@ +t7292-removal.scala:2: error: Octal escape literals are unsupported, use /u0000 instead. + val chr1 = '/0' + ^ +t7292-removal.scala:3: error: Octal escape literals are unsupported, use /u0053 instead. + val str1 = "abc/123456" + ^ +t7292-removal.scala:4: error: Octal escape literals are unsupported, use /n instead. + val lf = '/012' + ^ +three errors found diff --git a/test/files/neg/t7292-removal.flags b/test/files/neg/t7292-removal.flags new file mode 100644 index 0000000000..29f4ede37a --- /dev/null +++ b/test/files/neg/t7292-removal.flags @@ -0,0 +1 @@ +-Xfuture diff --git a/test/files/neg/t7292-removal.scala b/test/files/neg/t7292-removal.scala new file mode 100644 index 0000000000..d857f0e1ec --- /dev/null +++ b/test/files/neg/t7292-removal.scala @@ -0,0 +1,5 @@ +object OctalEscapes { + val chr1 = '\0' + val str1 = "abc\123456" + val lf = '\012' +} |