diff options
author | Paul Phillips <paulp@improving.org> | 2011-06-12 02:25:26 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-06-12 02:25:26 +0000 |
commit | 58a147ae51c09105d0dd7e7fd3a471ac467a8d05 (patch) | |
tree | 32758064fb70793802e4d69dc4030eb0171ce713 | |
parent | b96094446302a59b850dbb7d4ad9c593e9dddd9b (diff) | |
download | scala-58a147ae51c09105d0dd7e7fd3a471ac467a8d05.tar.gz scala-58a147ae51c09105d0dd7e7fd3a471ac467a8d05.tar.bz2 scala-58a147ae51c09105d0dd7e7fd3a471ac467a8d05.zip |
Don't issue unchecked warnings on higher-kinded...
Don't issue unchecked warnings on higher-kinded types. Closes #1439,
review by moors.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 1 | ||||
-rw-r--r-- | test/files/pos/bug1439.flags | 1 | ||||
-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 { |