diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-07-21 09:50:18 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-07-21 09:50:18 +0200 |
commit | 73fb460c1cd20ee97556ec0867d17efaa795d129 (patch) | |
tree | f541766eb081385c5fde91433e03dfce56f1429e /test | |
parent | afa96e3be767935cfe128d9365c8c9e04355dfde (diff) | |
parent | 5a30c40d3c9882bf4213124f8921b2be10d5f444 (diff) | |
download | scala-73fb460c1cd20ee97556ec0867d17efaa795d129.tar.gz scala-73fb460c1cd20ee97556ec0867d17efaa795d129.tar.bz2 scala-73fb460c1cd20ee97556ec0867d17efaa795d129.zip |
Merge pull request #3888 from som-snytt/issue/8736v2.11.2
SI-8736 Restore -language to former glory
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t8736-c.check | 11 | ||||
-rw-r--r-- | test/files/neg/t8736-c.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t8736-c.scala | 7 | ||||
-rw-r--r-- | test/files/pos/t8736-b.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t8736-b.scala | 7 | ||||
-rw-r--r-- | test/files/pos/t8736.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t8736.scala | 7 |
7 files changed, 35 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 diff --git a/test/files/neg/t8736-c.flags b/test/files/neg/t8736-c.flags new file mode 100644 index 0000000000..fde5313c96 --- /dev/null +++ b/test/files/neg/t8736-c.flags @@ -0,0 +1 @@ +-feature -language:-higherKinds,_ -Xfatal-warnings diff --git a/test/files/neg/t8736-c.scala b/test/files/neg/t8736-c.scala new file mode 100644 index 0000000000..8432775ae1 --- /dev/null +++ b/test/files/neg/t8736-c.scala @@ -0,0 +1,7 @@ +// scalac: -feature -language:-higherKinds,_ -Xfatal-warnings +// showing that wildcard doesn't supersede explicit disablement +class X { + def hk[M[_]] = ??? + + implicit def imp(x: X): Int = x.hashCode +} diff --git a/test/files/pos/t8736-b.flags b/test/files/pos/t8736-b.flags new file mode 100644 index 0000000000..1ad4eabe0f --- /dev/null +++ b/test/files/pos/t8736-b.flags @@ -0,0 +1 @@ +-feature -language:_ -Xfatal-warnings diff --git a/test/files/pos/t8736-b.scala b/test/files/pos/t8736-b.scala new file mode 100644 index 0000000000..903292d232 --- /dev/null +++ b/test/files/pos/t8736-b.scala @@ -0,0 +1,7 @@ +// scalac: -feature -language:_ -Xfatal-warnings +// showing that all are set +class X { + def hk[M[_]] = ??? + + implicit def imp(x: X): Int = x.hashCode +} diff --git a/test/files/pos/t8736.flags b/test/files/pos/t8736.flags new file mode 100644 index 0000000000..7fe42f7340 --- /dev/null +++ b/test/files/pos/t8736.flags @@ -0,0 +1 @@ +-feature -language:implicitConversions -language:higherKinds -language:-implicitConversions -Xfatal-warnings diff --git a/test/files/pos/t8736.scala b/test/files/pos/t8736.scala new file mode 100644 index 0000000000..46c0cdfd00 --- /dev/null +++ b/test/files/pos/t8736.scala @@ -0,0 +1,7 @@ +// scalac: -feature -language:implicitConversions -language:higherKinds -language:-implicitConversions -Xfatal-warnings +// showing that multiple settings are respected, and explicit enablement has precedence +class X { + def hk[M[_]] = ??? + + implicit def imp(x: X): Int = x.hashCode +} |