From 3ba11711d2022757f3d266288275330295e6a70b Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Wed, 8 Jun 2022 16:52:00 +0300 Subject: [PATCH] Adjust test data after reverting fix for KT-35811 (see previous commit) ^KT-52684 Fixed --- .../tests/syntax/complicatedLTGTE.fir.kt | 8 -- .../tests/syntax/complicatedLTGTE.kt | 3 +- compiler/testData/psi/complicateLTGTE.txt | 87 ++++++++----------- 3 files changed, 38 insertions(+), 60 deletions(-) delete mode 100644 compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.fir.kt diff --git a/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.fir.kt b/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.fir.kt deleted file mode 100644 index 613b3745e38..00000000000 --- a/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.fir.kt +++ /dev/null @@ -1,8 +0,0 @@ -// SKIP_TXT -// ISSUE: KT-52684 - -fun test(x: Int, y: Int) { - if (x < (if (y >= 115) 1 else 2)) { - Unit - } -} diff --git a/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.kt b/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.kt index 1989342ce34..b88a37daeff 100644 --- a/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.kt +++ b/compiler/testData/diagnostics/tests/syntax/complicatedLTGTE.kt @@ -1,8 +1,9 @@ +// FIR_IDENTICAL // SKIP_TXT // ISSUE: KT-52684 fun test(x: Int, y: Int) { - if (x < (if (y >= 115) 1 else 2)) { + if (x < (if (y >= 115) 1 else 2)) { Unit } } diff --git a/compiler/testData/psi/complicateLTGTE.txt b/compiler/testData/psi/complicateLTGTE.txt index a9970ec24a5..61b65e92678 100644 --- a/compiler/testData/psi/complicateLTGTE.txt +++ b/compiler/testData/psi/complicateLTGTE.txt @@ -38,60 +38,45 @@ KtFile: complicateLTGTE.kt PsiElement(LPAR)('(') CONDITION BINARY_EXPRESSION - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - PsiWhiteSpace(' ') - TYPE_PROJECTION - TYPE_REFERENCE - FUNCTION_TYPE - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - VALUE_PARAMETER - TYPE_REFERENCE - PsiErrorElement:Type expected - PsiElement(if)('if') - PsiErrorElement:Expecting comma or ')' - - PsiWhiteSpace(' ') - PsiErrorElement:Expecting ')' - PsiElement(LPAR)('(') - PsiErrorElement:Expecting '->' to specify return type of a function type - - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - PsiElement(GT)('>') - OPERATION_REFERENCE - PsiElement(EQ)('=') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('115') + OPERATION_REFERENCE + PsiElement(LT)('<') + PsiWhiteSpace(' ') + PARENTHESIZED + PsiElement(LPAR)('(') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(GTEQ)('>=') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('115') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('2') + PsiElement(RPAR)(')') PsiElement(RPAR)(')') PsiWhiteSpace(' ') THEN - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('2') - PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line) - PsiElement(RPAR)(')') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - LAMBDA_EXPRESSION - FUNCTION_LITERAL - PsiElement(LBRACE)('{') BLOCK - - PsiElement(RBRACE)('}') + PsiElement(LBRACE)('{') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') \ No newline at end of file + PsiElement(RBRACE)('}')