Performance workaround for assert call.
This commit is contained in:
@@ -153,11 +153,13 @@ public open class DelegatingFlexibleType protected (
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
assert (!lowerBound.isFlexible()) { "Lower bound of a flexible type can not be flexible: $lowerBound" }
|
if (ASSERTIONS_ENABLED) { // workaround for KT-7540
|
||||||
assert (!upperBound.isFlexible()) { "Upper bound of a flexible type can not be flexible: $upperBound" }
|
assert (!lowerBound.isFlexible()) { "Lower bound of a flexible type can not be flexible: $lowerBound" }
|
||||||
assert (lowerBound != upperBound) { "Lower and upper bounds are equal: $lowerBound == $upperBound" }
|
assert (!upperBound.isFlexible()) { "Upper bound of a flexible type can not be flexible: $upperBound" }
|
||||||
assert (JetTypeChecker.DEFAULT.isSubtypeOf(lowerBound, upperBound)) {
|
assert (lowerBound != upperBound) { "Lower and upper bounds are equal: $lowerBound == $upperBound" }
|
||||||
"Lower bound $lowerBound of a flexible type must be a subtype of the upper bound $upperBound"
|
assert (JetTypeChecker.DEFAULT.isSubtypeOf(lowerBound, upperBound)) {
|
||||||
|
"Lower bound $lowerBound of a flexible type must be a subtype of the upper bound $upperBound"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user