no ambiguity when overloading with different function type

(in incomplete resolve)
This commit is contained in:
Svetlana Isakova
2012-12-24 14:41:00 +04:00
parent 4c241b1234
commit 2077faa76a
3 changed files with 31 additions and 2 deletions
@@ -0,0 +1,16 @@
package a
trait Closeable {}
class C : Closeable {}
fun <T: Closeable, R> T.foo(block: (T)-> R) = block
fun <T: Closeable, R> T.foo(block: (T, T)-> R) = block
fun main(args: Array<String>) {
C().foo { // no ambiguity here
www ->
<!UNRESOLVED_REFERENCE!>xs<!>
}
}