FIR: Fix inference for case of non-nullable RHS of elvis
Some existing tests start failing after previous commits adding @Exact
attribute to `?:`
They have a form:
var x: String? = nullable()
if (x == null) {
x = nullable() ?: "" // considering @Exact the whole elvis is inferred to nullable from expect type
}
x.length // should be smart cast
This commit is contained in:
committed by
teamcityserver
parent
883b18a0c6
commit
3ec7866ead
+1
-1
@@ -14,7 +14,7 @@ FILE: ifElvisReturn.kt
|
||||
R|<local>/b|
|
||||
}
|
||||
else -> {
|
||||
R|/materialize|<R|kotlin/Nothing|>() ?: ^foo Unit
|
||||
R|/materialize|<R|B|>() ?: ^foo Unit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user