summaryrefslogtreecommitdiff
path: root/test/files/neg/t8736-c.check
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2014-07-20 14:48:33 -0700
committerSom Snytt <som.snytt@gmail.com>2014-07-20 15:14:35 -0700
commit01da58e6b6d356e7830183806056e27f70099caf (patch)
tree2439397b600fc6876ef4e7c709e81dae9a02061d /test/files/neg/t8736-c.check
parentabdd570cee5788000724c6d3b89a978c48a7fa39 (diff)
downloadscala-01da58e6b6d356e7830183806056e27f70099caf.tar.gz
scala-01da58e6b6d356e7830183806056e27f70099caf.tar.bz2
scala-01da58e6b6d356e7830183806056e27f70099caf.zip
SI-8736 Restore -language to former glory
MultiChoice allows -language to work like -Xlint. The bug as described was that the setting value was set instead of updated (++=) with additional flags. The unreported bug was that `_` no longer set all settings. The corrected behavior is that "contains" means "it was enabled, or _ was set and it was not disabled explicitly." That is the behavior of `-Xlint` but with a different mechanism, since each lint option is a Setting. A semantic difference is that -Xlint enables all the lint options, but -language does not enable all the language features. `scalac -X` does not explain this additional behavior of the `-Xlint` flag. Also worth noting that `scalac -feature -language unused.scala` failed in 2.11.1 but succeeds silently now.
Diffstat (limited to 'test/files/neg/t8736-c.check')
-rw-r--r--test/files/neg/t8736-c.check11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t8736-c.check b/test/files/neg/t8736-c.check
new file mode 100644
index 0000000000..06b2228543
--- /dev/null
+++ b/test/files/neg/t8736-c.check
@@ -0,0 +1,11 @@
+t8736-c.scala:4: warning: higher-kinded type should be enabled
+by making the implicit value scala.language.higherKinds visible.
+This can be achieved by adding the import clause 'import scala.language.higherKinds'
+or by setting the compiler option -language:higherKinds.
+See the Scala docs for value scala.language.higherKinds for a discussion
+why the feature should be explicitly enabled.
+ def hk[M[_]] = ???
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
+one error found