[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:
committed by
Space Team
parent
3b9095a5ab
commit
0efcad51e9
@@ -205,6 +205,19 @@ object AbstractTypeChecker {
|
|||||||
return isSubtypeOf(context.newTypeCheckerState(true, stubTypesEqualToAnything), subType, superType)
|
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(
|
fun isSubtypeOfClass(
|
||||||
state: TypeCheckerState,
|
state: TypeCheckerState,
|
||||||
typeConstructor: TypeConstructorMarker,
|
typeConstructor: TypeConstructorMarker,
|
||||||
|
|||||||
Reference in New Issue
Block a user