diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/ambiguous-float-dots.check | 27 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots.flags | 1 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots.scala | 14 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots2.check | 7 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots2.flags | 1 | ||||
-rw-r--r-- | test/files/neg/ambiguous-float-dots2.scala | 1 | ||||
-rw-r--r-- | test/files/neg/t6123-explaintypes-macros.check | 9 | ||||
-rw-r--r-- | test/files/neg/t6123-explaintypes-macros/BadMac_2.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t6123-explaintypes-macros/BadMac_2.scala | 8 | ||||
-rw-r--r-- | test/files/neg/t6123-explaintypes-macros/Macros.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t6123-explaintypes-macros/Macros.scala | 10 |
11 files changed, 31 insertions, 49 deletions
diff --git a/test/files/neg/ambiguous-float-dots.check b/test/files/neg/ambiguous-float-dots.check deleted file mode 100644 index cdd2d6fa2a..0000000000 --- a/test/files/neg/ambiguous-float-dots.check +++ /dev/null @@ -1,27 +0,0 @@ -ambiguous-float-dots.scala:2: warning: 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:6: warning: 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:7: warning: Treating numbers with a leading zero as octal is deprecated. - val y0 = 055 - ^ -ambiguous-float-dots.scala:11: warning: 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:12: warning: 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:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses - 1.+(2) - ^ -ambiguous-float-dots.scala:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses - 1. + 2 - ^ -ambiguous-float-dots.scala:13: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses - 1 + 2 - ^ -error: No warnings can be incurred under -Xfatal-warnings. -8 warnings found -one error found diff --git a/test/files/neg/ambiguous-float-dots.flags b/test/files/neg/ambiguous-float-dots.flags deleted file mode 100644 index 65faf53579..0000000000 --- a/test/files/neg/ambiguous-float-dots.flags +++ /dev/null @@ -1 +0,0 @@ --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 deleted file mode 100644 index 87e948db35..0000000000 --- a/test/files/neg/ambiguous-float-dots.scala +++ /dev/null @@ -1,14 +0,0 @@ -class A { - val x0 = 5. -} - -class B { - val x1 = 5.f - val y0 = 055 -} - -class D { - 1.+(2) - 1. + 2 - 1 + 2 -} diff --git a/test/files/neg/ambiguous-float-dots2.check b/test/files/neg/ambiguous-float-dots2.check index 8919d2c6a8..40c9b4186d 100644 --- a/test/files/neg/ambiguous-float-dots2.check +++ b/test/files/neg/ambiguous-float-dots2.check @@ -1,10 +1,7 @@ -ambiguous-float-dots2.scala:7: error: Non-zero numbers may not have a leading zero. - val y0 = 055 - ^ ambiguous-float-dots2.scala:3: error: identifier expected but '}' found. } ^ -ambiguous-float-dots2.scala:12: error: ';' expected but integer literal found. +ambiguous-float-dots2.scala:11: error: ';' expected but integer literal found. 1. + 2 ^ -three errors found +two errors found diff --git a/test/files/neg/ambiguous-float-dots2.flags b/test/files/neg/ambiguous-float-dots2.flags deleted file mode 100644 index 112fc720a0..0000000000 --- a/test/files/neg/ambiguous-float-dots2.flags +++ /dev/null @@ -1 +0,0 @@ --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 index 87e948db35..b1615c9273 100644 --- a/test/files/neg/ambiguous-float-dots2.scala +++ b/test/files/neg/ambiguous-float-dots2.scala @@ -4,7 +4,6 @@ class A { class B { val x1 = 5.f - val y0 = 055 } class D { diff --git a/test/files/neg/t6123-explaintypes-macros.check b/test/files/neg/t6123-explaintypes-macros.check new file mode 100644 index 0000000000..ebcb8069d5 --- /dev/null +++ b/test/files/neg/t6123-explaintypes-macros.check @@ -0,0 +1,9 @@ +c.universe.Expr[Any]* <: c.universe.Expr[String]*? +false +BadMac_2.scala:6: error: macro implementation has wrong shape: + required: (c: scala.reflect.macros.Context)(format: c.Expr[String], params: c.Expr[Any]*): c.Expr[Unit] + found : (c: scala.reflect.macros.Context)(format: c.Expr[String], params: c.Expr[String]*): c.Expr[Unit] +type mismatch for parameter params: c.Expr[Any]* does not conform to c.Expr[String]* + def printf(format: String, params: Any*): Unit = macro printf_impl + ^ +one error found diff --git a/test/files/neg/t6123-explaintypes-macros/BadMac_2.flags b/test/files/neg/t6123-explaintypes-macros/BadMac_2.flags new file mode 100644 index 0000000000..b36707c7cf --- /dev/null +++ b/test/files/neg/t6123-explaintypes-macros/BadMac_2.flags @@ -0,0 +1 @@ +-explaintypes diff --git a/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala b/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala new file mode 100644 index 0000000000..38b8e24444 --- /dev/null +++ b/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala @@ -0,0 +1,8 @@ +import scala.language.experimental.macros +import scala.reflect.macros.Context + +// explain some macro types to me +object BadMac { + def printf(format: String, params: Any*): Unit = macro printf_impl + def printf_impl(c: Context)(format: c.Expr[String], params: c.Expr[String]*): c.Expr[Unit] = ??? +} diff --git a/test/files/neg/t6123-explaintypes-macros/Macros.flags b/test/files/neg/t6123-explaintypes-macros/Macros.flags new file mode 100644 index 0000000000..b36707c7cf --- /dev/null +++ b/test/files/neg/t6123-explaintypes-macros/Macros.flags @@ -0,0 +1 @@ +-explaintypes diff --git a/test/files/neg/t6123-explaintypes-macros/Macros.scala b/test/files/neg/t6123-explaintypes-macros/Macros.scala new file mode 100644 index 0000000000..a12c277c86 --- /dev/null +++ b/test/files/neg/t6123-explaintypes-macros/Macros.scala @@ -0,0 +1,10 @@ +import scala.language.experimental.macros +import scala.reflect.macros.Context + +object Macros { + def printf(format: String, params: Any*): Unit = macro printf_impl + def printf_impl(c: Context)(format: c.Expr[String], params: c.Expr[Any]*): c.Expr[Unit] = ??? +} + +// something trivial to run +object Test extends App |