Removed useless as casts from compiler code
It allows compiling code with K2 and enabled `-Werror`
This commit is contained in:
committed by
Space Team
parent
d50c6f1b6d
commit
1827df82c4
+2
-3
@@ -300,10 +300,9 @@ class KtFe10ExpressionTypeProvider(
|
||||
}
|
||||
|
||||
override fun isDefinitelyNotNull(expression: KtExpression): Boolean {
|
||||
val ktExpression = expression as? KtExpression ?: return false
|
||||
val bindingContext = analysisContext.analyze(ktExpression)
|
||||
val bindingContext = analysisContext.analyze(expression)
|
||||
|
||||
val smartCasts = bindingContext[BindingContext.SMARTCAST, ktExpression]
|
||||
val smartCasts = bindingContext[BindingContext.SMARTCAST, expression]
|
||||
|
||||
if (smartCasts is MultipleSmartCasts) {
|
||||
if (smartCasts.map.values.all { !it.isMarkedNullable }) {
|
||||
|
||||
Reference in New Issue
Block a user