KT-3307 Compiler exception trying to call Java method

#KT-3307 Fixed
This commit is contained in:
Andrey Breslav
2013-02-07 15:40:12 +04:00
parent 091399aa4b
commit 0b4b87fc3a
7 changed files with 81 additions and 6 deletions
@@ -0,0 +1,21 @@
// FILE: Bug.java
public interface Bug {
<RET extends Bug> RET save();
}
// FILE: SubBug.java
public class SubBug implements Bug {
public SubBug save() {
return this;
}
}
// FILE: Bug.kt
fun TestBug() {
SubBug().save() // can resolve on subtype
val bug: Bug = SubBug()
bug.save<Bug>() // can resolve on supertype
}