diff --git a/core/compiler.common/src/org/jetbrains/kotlin/types/AbstractTypeChecker.kt b/core/compiler.common/src/org/jetbrains/kotlin/types/AbstractTypeChecker.kt index 9f1bde00f4f..7bc3bfb5331 100644 --- a/core/compiler.common/src/org/jetbrains/kotlin/types/AbstractTypeChecker.kt +++ b/core/compiler.common/src/org/jetbrains/kotlin/types/AbstractTypeChecker.kt @@ -205,6 +205,19 @@ object AbstractTypeChecker { return isSubtypeOf(context.newTypeCheckerState(true, stubTypesEqualToAnything), subType, superType) } + /** + * It matches class types but ignores their type parameters + * + * Consider the following example: + * + * ``` + * abstract class Foo + * class FooBar : Foo() + * ``` + * + * In this case `isSubtypeOfClass` returns `true` for `FooBar` and `Foo` input arguments + * But `isSubtypeOf` returns `false` for the same input arguments + */ fun isSubtypeOfClass( state: TypeCheckerState, typeConstructor: TypeConstructorMarker,