diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-02 18:04:05 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-02 18:04:05 +0100 |
commit | 14528228331bdb588278002208c46447e164870c (patch) | |
tree | 62e8ccdc7475c597af2f86628415ec29b90b4a2d /tests | |
parent | bddeaecb8f69032c5117e926ef67afc0deedd0dd (diff) | |
download | dotty-14528228331bdb588278002208c46447e164870c.tar.gz dotty-14528228331bdb588278002208c46447e164870c.tar.bz2 dotty-14528228331bdb588278002208c46447e164870c.zip |
Fixes to type applications and unapply.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/typedapply.scala | 17 | ||||
-rw-r--r-- | tests/pos/typedapply.scala | 11 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/neg/typedapply.scala b/tests/neg/typedapply.scala new file mode 100644 index 000000000..ae168bcd9 --- /dev/null +++ b/tests/neg/typedapply.scala @@ -0,0 +1,17 @@ +object typedapply { + + def foo[X, Y](x: X, y: Y) = (x, y) + + foo[Int](1, "abc") + + foo[Int, String, String](1, "abc") + + def bar(x: Int) = x + + bar[Int](1) + + def baz[X >: Y, Y <: String](x: X, y: Y) = (x, y) + + baz[Int, String](1, "abc") + +}
\ No newline at end of file diff --git a/tests/pos/typedapply.scala b/tests/pos/typedapply.scala new file mode 100644 index 000000000..e28e59d4f --- /dev/null +++ b/tests/pos/typedapply.scala @@ -0,0 +1,11 @@ +object typedapply { + + def foo[X, Y](x: X, y: Y) = (x, y) + + foo(1, "abc") + + foo[Int, String](1, "abc") + + foo[Int, String] _ + +}
\ No newline at end of file |