diff options
author | Martin Odersky <odersky@gmail.com> | 2012-07-28 18:13:59 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-07-28 18:14:11 +0200 |
commit | ed915c54cc8b3575ed3245c5793bfb051b5e98c1 (patch) | |
tree | e8485b0da5e1c1c698c11d55d5b10b5c216636ec /test/files/pos/t6029.scala | |
parent | 1f95d356ee69a442f98aedc024a1aa7e4672d20a (diff) | |
download | scala-ed915c54cc8b3575ed3245c5793bfb051b5e98c1.tar.gz scala-ed915c54cc8b3575ed3245c5793bfb051b5e98c1.tar.bz2 scala-ed915c54cc8b3575ed3245c5793bfb051b5e98c1.zip |
Closed 6029 ...
... in a less nice way than I would like. Essentially, we mask type errors at later stages that arise from comparing existentials and skolems because we know that they are not tracked correctly through all tree transformations. Never mind that all these types are going erased anyway shortly afterwards. It does not smell nice. But as I write in the comment, maybe the best way out is to
avoid skolems altogether. Such a change by far exceeds the scope of this pull request however.
Diffstat (limited to 'test/files/pos/t6029.scala')
-rw-r--r-- | test/files/pos/t6029.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/files/pos/t6029.scala b/test/files/pos/t6029.scala new file mode 100644 index 0000000000..8f1bbb4ebf --- /dev/null +++ b/test/files/pos/t6029.scala @@ -0,0 +1,3 @@ +final case class V[A](x: A) extends AnyVal { + def flatMap[B](f: A => V[B]) = if (true) this else f(x) +} |