More precise diagnostics of smart cast impossible #KT-7240 Fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Immutable(val x: String?) {
|
||||
fun foo(): String {
|
||||
if (x != null) return <!DEBUG_INFO_SMARTCAST!>x<!>
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
class Mutable(var y: String?) {
|
||||
fun foo(): String {
|
||||
if (y != null) return <!SMARTCAST_IMPOSSIBLE!>y<!>
|
||||
return ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user