diff options
Diffstat (limited to 'tests/neg/tate.scala')
-rw-r--r-- | tests/neg/tate.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/neg/tate.scala b/tests/neg/tate.scala new file mode 100644 index 000000000..acf7ee7e3 --- /dev/null +++ b/tests/neg/tate.scala @@ -0,0 +1,11 @@ + object unsound { + trait Bound[A, B <: A] + trait Bind[A] { + def bad[B <: A](bound: Bound[A, B], b: B) = b + } + def coerce[T, U](t: T): U = { + lazy val bound: Bound[U, _ >: T] = ??? // error: >: T does not conform to upper bound + def bind = new Bind[U] {} + bind.bad(bound, t) + } + } |