New enum syntax: Short constructor syntax introduced for entries, optional commas between entries, semicolon after entries. #KT-7605 Fixed.
Grammar changed accordingly. Semicolons prohibited after an entry except the last one. Only one initializer is allowed per entry. EnumReferenceExpression AST node introduced. Some tests fixed, a pair of new tests written. Kotlin code inside project fixed. Formatter and intendation tests fixed accordingly. Stub version is incremented.
This commit is contained in:
@@ -27,14 +27,9 @@ open class C1
|
||||
open class C2
|
||||
|
||||
enum class Test : A1 {
|
||||
FIRST_ITEM : Test(), C1(),
|
||||
C2()
|
||||
FIRST_ITEM : Test()
|
||||
SECOND_ITEM :
|
||||
Test()
|
||||
|
||||
THIRD_ITEM : Test(),
|
||||
C1()
|
||||
FORTH_ITEM : Test()
|
||||
}
|
||||
|
||||
// SET_TRUE: ALIGN_MULTILINE_EXTENDS_LIST
|
||||
@@ -27,14 +27,9 @@ open class C1
|
||||
open class C2
|
||||
|
||||
enum class Test : A1 {
|
||||
FIRST_ITEM : Test(), C1(),
|
||||
C2()
|
||||
FIRST_ITEM : Test()
|
||||
SECOND_ITEM :
|
||||
Test()
|
||||
|
||||
THIRD_ITEM : Test(),
|
||||
C1()
|
||||
FORTH_ITEM : Test()
|
||||
}
|
||||
|
||||
// SET_TRUE: ALIGN_MULTILINE_EXTENDS_LIST
|
||||
@@ -27,13 +27,9 @@ open class C1
|
||||
open class C2
|
||||
|
||||
enum class Test : A1 {
|
||||
FIRST_ITEM : Test(), C1(),
|
||||
C2()
|
||||
FIRST_ITEM : Test()
|
||||
SECOND_ITEM :
|
||||
Test()
|
||||
|
||||
THIRD_ITEM : Test(),
|
||||
C1() FORTH_ITEM : Test()
|
||||
}
|
||||
|
||||
// SET_TRUE: ALIGN_MULTILINE_EXTENDS_LIST
|
||||
Reference in New Issue
Block a user