diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-13 02:08:24 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-13 02:08:24 +0000 |
commit | 360f747c67006bc281ab28af3565eb602ed68b7c (patch) | |
tree | 18d1df3e1b39923cfa756d7429cfb4cce696b0e5 /test/files/neg | |
parent | 0fac26971e78fbe79b2ba5aaa87bde63816ac028 (diff) | |
download | scala-360f747c67006bc281ab28af3565eb602ed68b7c.tar.gz scala-360f747c67006bc281ab28af3565eb602ed68b7c.tar.bz2 scala-360f747c67006bc281ab28af3565eb602ed68b7c.zip |
Suppressed an error in type constructor bounds ...
Suppressed an error in type constructor bounds checking which was
obscuring the meaningful error to follow. Review by moors.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/hk-bad-bounds.check | 4 | ||||
-rw-r--r-- | test/files/neg/hk-bad-bounds.scala | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/hk-bad-bounds.check b/test/files/neg/hk-bad-bounds.check new file mode 100644 index 0000000000..d6293993c1 --- /dev/null +++ b/test/files/neg/hk-bad-bounds.check @@ -0,0 +1,4 @@ +hk-bad-bounds.scala:4: error: type arguments [Set] do not conform to class SeqFactory's type parameter bounds [CC[X] <: Seq[X] with scala.collection.generic.GenericTraversableTemplate[X,CC]] + def f(x: Boolean) = if (x) (null: SeqFactory[List]) else (null: SeqFactory[Set]) + ^ +one error found diff --git a/test/files/neg/hk-bad-bounds.scala b/test/files/neg/hk-bad-bounds.scala new file mode 100644 index 0000000000..0ed0b4c385 --- /dev/null +++ b/test/files/neg/hk-bad-bounds.scala @@ -0,0 +1,5 @@ +import collection.generic.SeqFactory + +class A { + def f(x: Boolean) = if (x) (null: SeqFactory[List]) else (null: SeqFactory[Set]) +} |