no ambiguity when overloading with different function type
(in incomplete resolve)
This commit is contained in:
+16
@@ -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<!>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user