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:
Roman Golyshev
2024-03-11 15:52:16 +01:00
committed by Space Team
parent f656a9fdc6
commit de75297875
15 changed files with 158 additions and 0 deletions
@@ -0,0 +1,5 @@
package test
open class <caret_sub>MyClass
class <caret_super>ChildClass : MyClass()
@@ -0,0 +1,2 @@
IS_SUBCLASS: false
IS_DIRECT_SUBCLASS: false
@@ -0,0 +1,7 @@
package test
open class <caret_super>GrandParent()
open class Parent : GrandParent()
class <caret_sub>MyClass : Parent()
@@ -0,0 +1,2 @@
IS_SUBCLASS: true
IS_DIRECT_SUBCLASS: false
@@ -0,0 +1,5 @@
package test
open class <caret_super>Parent
class <caret_sub>MyClass : Parent()
@@ -0,0 +1,2 @@
IS_SUBCLASS: true
IS_DIRECT_SUBCLASS: true
@@ -0,0 +1,2 @@
IS_SUBCLASS: true
IS_DIRECT_SUBCLASS: false
@@ -0,0 +1,4 @@
package test
class <caret_sub><caret_super>A
@@ -0,0 +1,2 @@
IS_SUBCLASS: false
IS_DIRECT_SUBCLASS: false
@@ -0,0 +1,5 @@
package test
class <caret_sub>First
class <caret_super>Second
@@ -0,0 +1,2 @@
IS_SUBCLASS: false
IS_DIRECT_SUBCLASS: false