NI: Add flexible Nothing to trivial constraints to filter it
This commit is contained in:
@@ -248,6 +248,9 @@ interface TypeSystemContext : TypeSystemOptimizationContext {
|
||||
|
||||
fun KotlinTypeMarker.isNullableAny() = this.typeConstructor().isAnyConstructor() && this.isNullableType()
|
||||
fun KotlinTypeMarker.isNothing() = this.typeConstructor().isNothingConstructor() && !this.isNullableType()
|
||||
fun KotlinTypeMarker.isFlexibleNothing() =
|
||||
this is FlexibleTypeMarker && lowerBound().isNothing() && upperBound().isNullableNothing()
|
||||
|
||||
fun KotlinTypeMarker.isNullableNothing() = this.typeConstructor().isNothingConstructor() && this.isNullableType()
|
||||
|
||||
fun SimpleTypeMarker.isClassType(): Boolean = typeConstructor().isClassTypeConstructor()
|
||||
|
||||
Reference in New Issue
Block a user