[FIR] Add a comment to isSubtypeOfClass that explains what this method does

And what the difference is between `isSubtypeOf` and `isSubtypeOf`
This commit is contained in:
Ivan Kochurkin
2023-10-23 22:18:04 +02:00
committed by Space Team
parent 3b9095a5ab
commit 0efcad51e9
@@ -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<T>
* class FooBar : Foo<Any>()
* ```
*
* In this case `isSubtypeOfClass` returns `true` for `FooBar` and `Foo<T>` input arguments
* But `isSubtypeOf` returns `false` for the same input arguments
*/
fun isSubtypeOfClass(
state: TypeCheckerState,
typeConstructor: TypeConstructorMarker,