K2 ignore return type on special java funs overrides

#KT-62197 fixed
This commit is contained in:
Ilya Chernikov
2023-11-03 16:44:16 +01:00
parent 312187dbe6
commit 122f16fc18
7 changed files with 73 additions and 1 deletions
+35
View File
@@ -0,0 +1,35 @@
// FIR_IDENTICAL
// FILE: main.kt
fun main() {
MutableLong().toLong()
}
// FILE: MutableLong.java
public class MutableLong extends Number {
private long value;
public MutableLong() {
}
public int intValue() {
return (int)this.value;
}
public long longValue() {
return this.value;
}
public float floatValue() {
return (float)this.value;
}
public double doubleValue() {
return (double)this.value;
}
public Long toLong() {
return this.longValue();
}
}