diff options
author | Martin Odersky <odersky@gmail.com> | 2014-06-18 18:20:14 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-06-18 18:21:07 +0200 |
commit | 7f721438b5bccc8ca9dd68cef273c8cac8199e1a (patch) | |
tree | a619fb770fee578354c7fca1f1c30c68f0d542d0 /tests/pending | |
parent | 388d9a889c6929699e879a307dc80145b906390a (diff) | |
download | dotty-7f721438b5bccc8ca9dd68cef273c8cac8199e1a.tar.gz dotty-7f721438b5bccc8ca9dd68cef273c8cac8199e1a.tar.bz2 dotty-7f721438b5bccc8ca9dd68cef273c8cac8199e1a.zip |
Handling higher-kinded types with lambdas
Switch to the new scheme where higher-kinded types (and also some polymorphic
type aliases) are represented as instances of Lambda traits.
Diffstat (limited to 'tests/pending')
-rw-r--r-- | tests/pending/pos/t1236a.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pending/pos/t1236a.scala b/tests/pending/pos/t1236a.scala new file mode 100644 index 000000000..a1a5a81f4 --- /dev/null +++ b/tests/pending/pos/t1236a.scala @@ -0,0 +1,15 @@ +trait Empty[E[_]] { + def e[A]: E[A] +} + +object T { + val ListEmpty = new Empty[List] { + def e[B] = Nil + } + + // needs better type inference for hk types + def foo[F[_]](q:(String,String)) = "hello" + def foo[F[_]](e: Empty[F]) = "world" + + val x = foo[List](ListEmpty) +} |