summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala1
-rw-r--r--test/files/pos/bug1439.flags1
-rw-r--r--test/files/pos/bug1439.scala (renamed from test/files/pos/t1439.scala)3
3 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 8b9107d473..87c6b54756 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -1407,6 +1407,7 @@ trait Infer {
} else {
for (arg <- args) {
if (sym == ArrayClass) check(arg, bound)
+ else if (arg.typeArgs.nonEmpty) () // avoid spurious warnings with higher-kinded types
else arg match {
case TypeRef(_, sym, _) if isLocalBinding(sym) =>
;
diff --git a/test/files/pos/bug1439.flags b/test/files/pos/bug1439.flags
new file mode 100644
index 0000000000..779916d58f
--- /dev/null
+++ b/test/files/pos/bug1439.flags
@@ -0,0 +1 @@
+-unchecked -Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t1439.scala b/test/files/pos/bug1439.scala
index ae1fdd10b5..68a7332b2a 100644
--- a/test/files/pos/t1439.scala
+++ b/test/files/pos/bug1439.scala
@@ -1,4 +1,5 @@
-class View[C[A]] {}
+// no unchecked warnings
+class View[C[A]] { }
object Test {
null match {