diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-18 11:29:13 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-18 11:29:13 +0100 |
commit | 15d8a2e9804fe55c9261e195088da55c0eaa6803 (patch) | |
tree | c9cfbfe068b7f301c43e9987959f29843cf715dc /tests | |
parent | 6b106397a683b9de4bf05da7e768ebf747085c55 (diff) | |
download | dotty-15d8a2e9804fe55c9261e195088da55c0eaa6803.tar.gz dotty-15d8a2e9804fe55c9261e195088da55c0eaa6803.tar.bz2 dotty-15d8a2e9804fe55c9261e195088da55c0eaa6803.zip |
Making sure New's always end in an application.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/overloaded.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/overloaded.scala b/tests/pos/overloaded.scala index d76585f93..ba5d8c205 100644 --- a/tests/pos/overloaded.scala +++ b/tests/pos/overloaded.scala @@ -6,5 +6,17 @@ object overloaded { val x1 = f("abc") val x2 = f(new Integer(1)) val x3 = f(null) + + val x4: String => String = f + val x5: String => Any = f + val x6: Any = f _ + + def g(): Int = 1 + def g(x: Int): Int = 2 + + val y1: Int => Int = g + val y2: Any = g _ + + println(g) } |