Refactor external overidability conditions
Before this change they could only negatively affect on result Now they may force success result Also refine overridavility condition for java fields: two java fields having the same name are seen as overrides even if they have different type
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
public class A {
|
||||
public int size = 1;
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
|
||||
public class B extends A {
|
||||
public String size = 1;
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun foo() {
|
||||
B().size.checkType { _<String>() }
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public fun foo(): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public final var size: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class B : A {
|
||||
public constructor B()
|
||||
public final override /*1*/ var size: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user