[FIR] Comparison to String implies smart cast to String
When the left-hand side of an equality comparison is known to be a String, and the equality condition resolves to true, then the right-hand side can be smart-cast to a String as well. This was working for String expressions on the left-hand side but not for String constants. ^KT-57513 Fixed
This commit is contained in:
@@ -2,8 +2,12 @@ package
|
||||
|
||||
public fun bar(/*0*/ i: Test?): kotlin.Unit
|
||||
public fun bar(/*0*/ i: TestWithEquals?): kotlin.Unit
|
||||
public fun char(/*0*/ foo: kotlin.Any): kotlin.Unit
|
||||
public fun foo(/*0*/ x: kotlin.String?): kotlin.String?
|
||||
public fun gav(/*0*/ i: TestWithEquals?, /*1*/ j: TestWithEquals?): kotlin.Unit
|
||||
public fun int(/*0*/ foo: kotlin.Any): kotlin.Unit
|
||||
public fun long(/*0*/ foo: kotlin.Any): kotlin.Unit
|
||||
public fun string(/*0*/ foo: kotlin.Any): kotlin.Unit
|
||||
|
||||
public final class Test {
|
||||
public constructor Test()
|
||||
|
||||
Reference in New Issue
Block a user