Extract common logic into AbstractTypeConstructor
Mostly it's about detecting loops in supertypes Test data changes: - Loops are being disconnected in Java classes too - functions.kt: loops disconnection mechanism runs supertypes calculation, so when we start check T it forces F' supertypes calculation, that ends with CYCLIC_GENERIC_UPPER_BOUND reported on F #KT-11287 In Progress
This commit is contained in:
+2
-5
@@ -1,8 +1,6 @@
|
||||
package
|
||||
|
||||
public/*package*/ interface A : C {
|
||||
public abstract override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun baz(): kotlin.Unit
|
||||
public/*package*/ interface A {
|
||||
public abstract fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -10,7 +8,6 @@ public interface B {
|
||||
public abstract fun bar(): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ interface C : B {
|
||||
public abstract override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit
|
||||
public/*package*/ interface C {
|
||||
public abstract fun baz(): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package
|
||||
|
||||
public/*package*/ open class J : K {
|
||||
public/*package*/ open class J {
|
||||
public/*package*/ constructor J()
|
||||
public final override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit
|
||||
public/*package*/ open fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -5,10 +5,9 @@ public open class I {
|
||||
public final fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ open class J : I {
|
||||
public/*package*/ open class J {
|
||||
public/*package*/ constructor J()
|
||||
public/*package*/ open fun bar(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class K {
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package
|
||||
public interface ExceptionTracker {
|
||||
}
|
||||
|
||||
public/*package*/ open class LockBasedStorageManager : StorageManager {
|
||||
public/*package*/ open class LockBasedStorageManager {
|
||||
public/*package*/ constructor LockBasedStorageManager()
|
||||
@java.lang.Override() public/*package*/ open override /*1*/ fun foo(): kotlin.Unit
|
||||
@java.lang.Override() public/*package*/ open fun foo(): kotlin.Unit
|
||||
|
||||
public/*package*/ interface ExceptionHandlingStrategy {
|
||||
public abstract fun bar(): kotlin.Unit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fun <<!CYCLIC_GENERIC_UPPER_BOUND!>T : F?<!>, F : T?> foo1() {}
|
||||
fun <<!CYCLIC_GENERIC_UPPER_BOUND!>T : F?<!>, <!CYCLIC_GENERIC_UPPER_BOUND!>F : T?<!>> foo1() {}
|
||||
|
||||
fun <T : F?, <!CYCLIC_GENERIC_UPPER_BOUND!>F : E<!>, E : F?> foo2() {}
|
||||
fun <T : F?, <!CYCLIC_GENERIC_UPPER_BOUND!>F : E<!>, <!CYCLIC_GENERIC_UPPER_BOUND!>E : F?<!>> foo2() {}
|
||||
|
||||
fun <<!CYCLIC_GENERIC_UPPER_BOUND!>T<!>, F> foo3() where T : F?, F : T {}
|
||||
fun <<!CYCLIC_GENERIC_UPPER_BOUND!>T<!>, <!CYCLIC_GENERIC_UPPER_BOUND!>F<!>> foo3() where T : F?, F : T {}
|
||||
|
||||
fun <T, <!CYCLIC_GENERIC_UPPER_BOUND!>F<!>, E> foo4() where T : F?, F : E, E : F? {}
|
||||
fun <T, <!CYCLIC_GENERIC_UPPER_BOUND!>F<!>, <!CYCLIC_GENERIC_UPPER_BOUND!>E<!>> foo4() where T : F?, F : E, E : F? {}
|
||||
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T : [ERROR : Cyclic upper bounds], /*1*/ F : T?> foo1(): kotlin.Unit
|
||||
public fun </*0*/ T : F?, /*1*/ F : [ERROR : Cyclic upper bounds], /*2*/ E : F?> foo2(): kotlin.Unit
|
||||
public fun </*0*/ T : [ERROR : Cyclic upper bounds], /*1*/ F : T> foo3(): kotlin.Unit
|
||||
public fun </*0*/ T : F?, /*1*/ F : [ERROR : Cyclic upper bounds], /*2*/ E : F?> foo4(): kotlin.Unit
|
||||
public fun </*0*/ T : [ERROR : Cyclic upper bounds], /*1*/ F : [ERROR : Cyclic upper bounds]> foo1(): kotlin.Unit
|
||||
public fun </*0*/ T : F?, /*1*/ F : [ERROR : Cyclic upper bounds], /*2*/ E : [ERROR : Cyclic upper bounds]> foo2(): kotlin.Unit
|
||||
public fun </*0*/ T : [ERROR : Cyclic upper bounds], /*1*/ F : [ERROR : Cyclic upper bounds]> foo3(): kotlin.Unit
|
||||
public fun </*0*/ T : F?, /*1*/ F : [ERROR : Cyclic upper bounds], /*2*/ E : [ERROR : Cyclic upper bounds]> foo4(): kotlin.Unit
|
||||
|
||||
Reference in New Issue
Block a user