KT-8263: Conditional operators are not parsed correctly

This commit is contained in:
Iven Krall
2022-06-12 20:05:43 +02:00
committed by teamcity
parent 2053363def
commit ec8da2033c
37 changed files with 4847 additions and 218 deletions
@@ -1,8 +0,0 @@
// SKIP_TXT
// ISSUE: KT-8263
fun test(x: Int, y: Int) {
if (<!CONDITION_TYPE_MISMATCH!>x < (<!SYNTAX!>if<!><!SYNTAX!><!> <!SYNTAX!>(<!><!UNRESOLVED_REFERENCE!><!SYNTAX!><!>y<!> ><!><!SYNTAX!><!> 115<!SYNTAX!>) 1 else 2))<!> {
Unit
}
}
@@ -1,8 +1,9 @@
// FIR_IDENTICAL
// SKIP_TXT
// ISSUE: KT-8263
fun test(x: Int, y: Int) {
if (<!UNRESOLVED_REFERENCE!>x<!> < (<!SYNTAX!>if<!><!SYNTAX!><!> <!SYNTAX!>(<!><!UNRESOLVED_REFERENCE!><!SYNTAX!><!>y<!> ><!SYNTAX!><!> 115<!SYNTAX!>) 1 else 2))<!> {
if (x < (if (y > 115) 1 else 2)) {
Unit
}
}