[Spec tests] Apply changes in parse trees due to trailing comma introducing
This commit is contained in:
committed by
Victor Petukhov
parent
f62901d7d9
commit
ab3b63c92a
+2
-2
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
fun case_1() {
|
fun case_1() {
|
||||||
when {
|
when {
|
||||||
value == 21, -> return ""
|
value == 21,, -> return ""
|
||||||
value is Int, value is String, -> return ""
|
value is Int, ,value is String, -> return ""
|
||||||
value in -100..100, value in value, -> return ""
|
value in -100..100, value in value, -> return ""
|
||||||
}
|
}
|
||||||
when {
|
when {
|
||||||
|
|||||||
+4
-6
@@ -31,6 +31,8 @@ KtFile: 2.2.kt
|
|||||||
INTEGER_CONSTANT
|
INTEGER_CONSTANT
|
||||||
PsiElement(INTEGER_LITERAL)('21')
|
PsiElement(INTEGER_LITERAL)('21')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
|
PsiErrorElement:Expecting a when-condition
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
WHEN_CONDITION_WITH_EXPRESSION
|
WHEN_CONDITION_WITH_EXPRESSION
|
||||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||||
@@ -59,6 +61,8 @@ KtFile: 2.2.kt
|
|||||||
PsiElement(IDENTIFIER)('Int')
|
PsiElement(IDENTIFIER)('Int')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
|
PsiErrorElement:Expecting a when-condition
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
WHEN_CONDITION_WITH_EXPRESSION
|
WHEN_CONDITION_WITH_EXPRESSION
|
||||||
IS_EXPRESSION
|
IS_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
@@ -73,9 +77,6 @@ KtFile: 2.2.kt
|
|||||||
PsiElement(IDENTIFIER)('String')
|
PsiElement(IDENTIFIER)('String')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
WHEN_CONDITION_WITH_EXPRESSION
|
|
||||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
|
||||||
<empty list>
|
|
||||||
PsiElement(ARROW)('->')
|
PsiElement(ARROW)('->')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
RETURN
|
RETURN
|
||||||
@@ -118,9 +119,6 @@ KtFile: 2.2.kt
|
|||||||
PsiElement(IDENTIFIER)('value')
|
PsiElement(IDENTIFIER)('value')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
WHEN_CONDITION_WITH_EXPRESSION
|
|
||||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
|
||||||
<empty list>
|
|
||||||
PsiElement(ARROW)('->')
|
PsiElement(ARROW)('->')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
RETURN
|
RETURN
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
fun case_1() {
|
fun case_1() {
|
||||||
when (value) {
|
when (value) {
|
||||||
-10000, value.getInt(11), Int.MIN_VALUE, -> return ""
|
-10000, value.getInt(11), Int.MIN_VALUE,, -> return ""
|
||||||
21, , -> return ""
|
21, , -> return ""
|
||||||
, , -> return ""
|
, , -> return ""
|
||||||
, value.getInt(11) -> return ""
|
, value.getInt(11) -> return ""
|
||||||
|
|||||||
+2
@@ -57,6 +57,8 @@ KtFile: 1.3.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('MIN_VALUE')
|
PsiElement(IDENTIFIER)('MIN_VALUE')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
|
PsiErrorElement:Expecting a when-condition
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
WHEN_CONDITION_WITH_EXPRESSION
|
WHEN_CONDITION_WITH_EXPRESSION
|
||||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||||
|
|||||||
Reference in New Issue
Block a user