KT-66498 [AA] Add more tests for the isSubClassOf/isDirectSubClassOf
Also, reproduce the difference between the K1 and K2 implementation of `isSubClassOf` for the same class
This commit is contained in:
committed by
Space Team
parent
f656a9fdc6
commit
de75297875
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
open class <caret_sub>MyClass
|
||||
|
||||
class <caret_super>ChildClass : MyClass()
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
IS_SUBCLASS: false
|
||||
IS_DIRECT_SUBCLASS: false
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
open class <caret_super>GrandParent()
|
||||
|
||||
open class Parent : GrandParent()
|
||||
|
||||
class <caret_sub>MyClass : Parent()
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
IS_SUBCLASS: true
|
||||
IS_DIRECT_SUBCLASS: false
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
open class <caret_super>Parent
|
||||
|
||||
class <caret_sub>MyClass : Parent()
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
IS_SUBCLASS: true
|
||||
IS_DIRECT_SUBCLASS: true
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
IS_SUBCLASS: true
|
||||
IS_DIRECT_SUBCLASS: false
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
class <caret_sub><caret_super>A
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
IS_SUBCLASS: false
|
||||
IS_DIRECT_SUBCLASS: false
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class <caret_sub>First
|
||||
|
||||
class <caret_super>Second
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
IS_SUBCLASS: false
|
||||
IS_DIRECT_SUBCLASS: false
|
||||
Reference in New Issue
Block a user