From cb8b0bd2e6f2fe4d508e020726a47bf02a1a5c9b Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Tue, 14 Feb 2023 15:33:04 +0100 Subject: [PATCH 01/22] Remove annotations from declarations not allowed to have type parameters Fixes KT-56667 --- docs/src/md/kotlin.core/declarations.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index b4116757d..c1c1c9f4d 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -1706,7 +1706,6 @@ The following declarations are not allowed to have type parameters: - Constructor declarations; - Getters and setters of property declarations; - Enum class declarations; -- Annotation class declarations; - Classifier declarations inheriting from `kotlin.Throwable`. Type parameters are allowed to specify *subtyping restrictions* on them in the form `T : U`, meaning $T <: U$ where $T$ is a type parameter and $U$ is some other type available in the scope the declaration is declared in. From cd894a1cc184e7514a3e3b247f913b1ede2b2891 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Tue, 14 Feb 2023 16:35:37 +0100 Subject: [PATCH 02/22] Better phasing for in-place property declarations in when-expressions --- docs/src/md/kotlin.core/expressions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/md/kotlin.core/expressions.md b/docs/src/md/kotlin.core/expressions.md index e0f541311..d41c12542 100644 --- a/docs/src/md/kotlin.core/expressions.md +++ b/docs/src/md/kotlin.core/expressions.md @@ -418,7 +418,7 @@ If when expression is not [exhaustive][Exhaustive when expressions], it has type > } > ``` -When with bound value also allows for an inline property declaration of the form `when (val V = E) { ... }` inside the parentheses. +When with bound value also allows for an in-place property declaration of the form `when (val V = E) { ... }` inside the parentheses. This declares a new property (see [declaration sections][Property declaration] for details) alongside the usual mechanics of the *when-expression*. The scope of this property is limited to the `when` expression, including both conditions and control structure bodies of the expression. As its form is limited to a simple "assignment-like" declaration with an initializer, this property does not allow getters, setters, delegation or destructuring. From 939b6fb08a75973705ec6e6a4dbf7c6b30781550 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Tue, 14 Feb 2023 17:20:35 +0100 Subject: [PATCH 03/22] Add that inline properties can have reified type parameters Fixes KT-56669 --- docs/src/md/kotlin.core/declarations.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index c1c1c9f4d..871a2301f 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -1385,7 +1385,9 @@ Properties without backing fields are not allowed to have initializer expression Read/write access to the property is replaced with getter/setter invocation respectively. Getters and setters allow for some modifiers available for function declarations (for example, they may be declared `inline`, see grammar for details). + Properties themselves may also be declared `inline`, meaning that both getter and setter of said property are `inline`. +Additionally, `inline` properties are not allowed to have backing fields, i.e., they must have custom accessors which do not use the `field` property. #### Delegated property declaration @@ -1790,9 +1792,9 @@ By supplying this annotation the author of the code explicitly declares that saf #### Reified type parameters -Type parameters of inline function declarations (and only those) can be declared `reified` using the corresponding keyword. -A reified type parameter is a [runtime-available][Runtime-available types] type inside the function scope, see the corresponding section for details. -Reified type parameters can only be substituted by other [runtime-available types][Runtime-available types] when using such functions. +Type parameters of inline function or property declarations (and only those) can be declared `reified` using the corresponding keyword. +A reified type parameter is a [runtime-available][Runtime-available types] type inside their declaration's scope, see the corresponding section for details. +Reified type parameters can only be substituted by other [runtime-available types][Runtime-available types] when using such declarations. > Example: > From 3b6aab31465ecddbb7621362a8cdfb42a99e9a5f Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Fri, 26 May 2023 15:05:30 +0200 Subject: [PATCH 04/22] KT-58932: add the overload candidate set priority for the `T::f` callable reference resolution --- docs/src/md/kotlin.core/overload-resolution.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/src/md/kotlin.core/overload-resolution.md b/docs/src/md/kotlin.core/overload-resolution.md index 8149f9059..95c3cd744 100644 --- a/docs/src/md/kotlin.core/overload-resolution.md +++ b/docs/src/md/kotlin.core/overload-resolution.md @@ -730,6 +730,14 @@ TODO: more examples > Note: this is different from the overload resolution for regular calls in that no most specific candidate selection process is performed inside the sets +> Important: when the callable reference resolution for `T::f` requires building overload candidate sets for both [type][Call with an explicit type receiver] and [value][Call with an explicit receiver] receiver candidates, they are considered in the following order. +> +> 1. Static member callables named `f` of type `T`; +> 2. The overload candidate sets for call `t::f`, where `t` is a value of type `T`; +> 3. The overload candidate sets for call `T::f`, where `T` is a companion object of type `T`. +> +> Callable references to members of companion objects are deprioritized, as you could always use the `T.Companion::f` syntax to reference them. + > Important: when building the OCS for a callable reference, `invoke` operator convention does not apply, and all property references are treated equally as function references, being placed in the same sets. > For example, consider the following code: > From 65caa1147ac493ffc056d017f52126d3bf1a0d26 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Fri, 6 Jan 2023 18:43:08 +0100 Subject: [PATCH 05/22] KT-53323: Add `entries` property to the enum class declaration Also tweak the overload resolution order for calls with an explicit type receiver to discriminate implicitly added (synthetic) callables --- docs/src/md/kotlin.core/declarations.md | 34 ++++++++++++++----- .../src/md/kotlin.core/overload-resolution.md | 3 +- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index 871a2301f..6827837d8 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -510,6 +510,8 @@ Enum class $E$ is a special kind of class with the following properties: - It cannot have type parameters of any kind; - It has special syntax to accommodate for the properties described above. +> Note: for the purposes of overload resolution, enum entries are considered to be [static member callables][Call with an explicit type receiver] of the enum class type + Enum class body uses special kind of syntax (see grammar) to declare enum entries in addition to all other declarations inside the class body. Enum entries have their own bodies that may contain their own declarations, similar to [object declarations][Classifier declaration]. @@ -542,27 +544,41 @@ Every enum entry of class `E` implicitly overrides members of `kotlin.Enum` i (a member of `kotlin.Any`) defined by default to return the entry name, but may be overridden to have different behaviour both in the enum class declaration and in entry declarations. -In addition to these, every enum class type `E` has the following **static** member functions declared implicitly: +In addition to these, every enum class type `E` has the following **static** members declared implicitly: + +- ```kotlin + public final static val entries: EnumEntries + ``` + + This property returns an instance of a special immutable `EnumEntries` list of all possible enum values in the order they are declared; - ```kotlin public final static fun valueOf(value: String): E ``` - returning an object corresponding to the entry with the name equal to `value` parameter of the call or throws an exception otherwise; + This function returns an object corresponding to the entry with the name equal to `value` parameter of the call or throws an exception otherwise. + +> Important: `static` is not a valid Kotlin keyword and is only used here for clarity. +> The static members are handled differently by the [overload resolution][Call with an explicit type receiver]. + +Kotlin standard library also introduces a function to access all enum values for a specific enum class called `kotlin.enumEntries`. +Please refer to the standard library documentation for details. + +> Note: the `entries` property is available since Kotlin 1.9. + +For backwards compatibility, in addition to the `entries` property, every enum class type `E` has the following **static** member function declared implicitly. - ```kotlin public final static fun values(): kotlin.Array ``` - - returning an [array][Array types] of all possible enum values in the order they are declared. - Every invocation of this function returns a new array to disallow changing its contents. -> Important: `static` is not a valid Kotlin keyword and is only used here for clarity + This function returns an [array][Array types] of all possible enum values in the order they are declared. + Every invocation of this function returns a new array to disallow changing its contents. -> Note: these static member functions are handled differently by the [overload resolution][Overload resolution]. +> Important: `values` function is effectively deprecated and `entries` property should be used instead. -> Note: Kotlin standard library introduces another function to access all enum values for a specific enum class called `kotlin.enumValues`. -> Please refer to the standard library documentation for details. +Kotlin standard library also introduces another function to access all enum values for a specific enum class called `kotlin.enumValues` (which is deprecated for subsequent removal). +Please refer to the standard library documentation for details. > Example: > diff --git a/docs/src/md/kotlin.core/overload-resolution.md b/docs/src/md/kotlin.core/overload-resolution.md index 95c3cd744..bbe0b7c32 100644 --- a/docs/src/md/kotlin.core/overload-resolution.md +++ b/docs/src/md/kotlin.core/overload-resolution.md @@ -230,7 +230,8 @@ They mostly follow the same rules as [calls with an explicit value receiver][Cal However, for a callable `f` with an explicit type receiver `T` the following sets are analyzed (**in the given order**): 1. Static member callables named `f` of type `T`; -2. The overload candidate sets for call `T.f()`, where `T` is a companion object of type `T`. +2. Static member callables named `f` of type `T` declared implicitly; +3. The overload candidate sets for call `T.f()`, where `T` is a companion object of type `T`. ##### Call with an explicit super-form receiver From ef10b569ff859b400eb350f0dca2b083e3cda616 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Mon, 22 Aug 2022 15:29:03 +0200 Subject: [PATCH 06/22] Add range-until operator ..< to grammar --- grammar/src/main/antlr/KotlinLexer.g4 | 2 + grammar/src/main/antlr/KotlinLexer.tokens | 454 +++++++++++----------- grammar/src/main/antlr/KotlinParser.g4 | 2 +- 3 files changed, 231 insertions(+), 227 deletions(-) diff --git a/grammar/src/main/antlr/KotlinLexer.g4 b/grammar/src/main/antlr/KotlinLexer.g4 index d36cdbba1..3eff52ff1 100644 --- a/grammar/src/main/antlr/KotlinLexer.g4 +++ b/grammar/src/main/antlr/KotlinLexer.g4 @@ -68,6 +68,7 @@ MOD_ASSIGNMENT: '%='; ARROW: '->'; DOUBLE_ARROW: '=>'; RANGE: '..'; +RANGE_UNTIL: '..<'; COLONCOLON: '::'; DOUBLE_SEMICOLON: ';;'; HASH: '#'; @@ -417,6 +418,7 @@ Inside_MOD_ASSIGNMENT: MOD_ASSIGNMENT -> type(MOD_ASSIGNMENT); Inside_ARROW: ARROW -> type(ARROW); Inside_DOUBLE_ARROW: DOUBLE_ARROW -> type(DOUBLE_ARROW); Inside_RANGE: RANGE -> type(RANGE); +Inside_RANGE_UNTIL: RANGE_UNTIL -> type(RANGE_UNTIL); Inside_RESERVED: RESERVED -> type(RESERVED); Inside_COLONCOLON: COLONCOLON -> type(COLONCOLON); Inside_DOUBLE_SEMICOLON: DOUBLE_SEMICOLON -> type(DOUBLE_SEMICOLON); diff --git a/grammar/src/main/antlr/KotlinLexer.tokens b/grammar/src/main/antlr/KotlinLexer.tokens index 8692c66d6..9aefd79cc 100644 --- a/grammar/src/main/antlr/KotlinLexer.tokens +++ b/grammar/src/main/antlr/KotlinLexer.tokens @@ -34,142 +34,143 @@ MOD_ASSIGNMENT=33 ARROW=34 DOUBLE_ARROW=35 RANGE=36 -COLONCOLON=37 -DOUBLE_SEMICOLON=38 -HASH=39 -AT_NO_WS=40 -AT_POST_WS=41 -AT_PRE_WS=42 -AT_BOTH_WS=43 -QUEST_WS=44 -QUEST_NO_WS=45 -LANGLE=46 -RANGLE=47 -LE=48 -GE=49 -EXCL_EQ=50 -EXCL_EQEQ=51 -AS_SAFE=52 -EQEQ=53 -EQEQEQ=54 -SINGLE_QUOTE=55 -AMP=56 -RETURN_AT=57 -CONTINUE_AT=58 -BREAK_AT=59 -THIS_AT=60 -SUPER_AT=61 -FILE=62 -FIELD=63 -PROPERTY=64 -GET=65 -SET=66 -RECEIVER=67 -PARAM=68 -SETPARAM=69 -DELEGATE=70 -PACKAGE=71 -IMPORT=72 -CLASS=73 -INTERFACE=74 -FUN=75 -OBJECT=76 -VAL=77 -VAR=78 -TYPE_ALIAS=79 -CONSTRUCTOR=80 -BY=81 -COMPANION=82 -INIT=83 -THIS=84 -SUPER=85 -TYPEOF=86 -WHERE=87 -IF=88 -ELSE=89 -WHEN=90 -TRY=91 -CATCH=92 -FINALLY=93 -FOR=94 -DO=95 -WHILE=96 -THROW=97 -RETURN=98 -CONTINUE=99 -BREAK=100 -AS=101 -IS=102 -IN=103 -NOT_IS=104 -NOT_IN=105 -OUT=106 -DYNAMIC=107 -PUBLIC=108 -PRIVATE=109 -PROTECTED=110 -INTERNAL=111 -ENUM=112 -SEALED=113 -ANNOTATION=114 -DATA=115 -INNER=116 -VALUE=117 -TAILREC=118 -OPERATOR=119 -INLINE=120 -INFIX=121 -EXTERNAL=122 -SUSPEND=123 -OVERRIDE=124 -ABSTRACT=125 -FINAL=126 -OPEN=127 -CONST=128 -LATEINIT=129 -VARARG=130 -NOINLINE=131 -CROSSINLINE=132 -REIFIED=133 -EXPECT=134 -ACTUAL=135 -RealLiteral=136 -FloatLiteral=137 -DoubleLiteral=138 -IntegerLiteral=139 -HexLiteral=140 -BinLiteral=141 -UnsignedLiteral=142 -LongLiteral=143 -BooleanLiteral=144 -NullLiteral=145 -CharacterLiteral=146 -Identifier=147 -IdentifierOrSoftKey=148 -FieldIdentifier=149 -QUOTE_OPEN=150 -TRIPLE_QUOTE_OPEN=151 -UNICODE_CLASS_LL=152 -UNICODE_CLASS_LM=153 -UNICODE_CLASS_LO=154 -UNICODE_CLASS_LT=155 -UNICODE_CLASS_LU=156 -UNICODE_CLASS_ND=157 -UNICODE_CLASS_NL=158 -QUOTE_CLOSE=159 -LineStrRef=160 -LineStrText=161 -LineStrEscapedChar=162 -LineStrExprStart=163 -TRIPLE_QUOTE_CLOSE=164 -MultiLineStringQuote=165 -MultiLineStrRef=166 -MultiLineStrText=167 -MultiLineStrExprStart=168 -Inside_Comment=169 -Inside_WS=170 -Inside_NL=171 -ErrorCharacter=172 +RANGE_UNTIL=37 +COLONCOLON=38 +DOUBLE_SEMICOLON=39 +HASH=40 +AT_NO_WS=41 +AT_POST_WS=42 +AT_PRE_WS=43 +AT_BOTH_WS=44 +QUEST_WS=45 +QUEST_NO_WS=46 +LANGLE=47 +RANGLE=48 +LE=49 +GE=50 +EXCL_EQ=51 +EXCL_EQEQ=52 +AS_SAFE=53 +EQEQ=54 +EQEQEQ=55 +SINGLE_QUOTE=56 +AMP=57 +RETURN_AT=58 +CONTINUE_AT=59 +BREAK_AT=60 +THIS_AT=61 +SUPER_AT=62 +FILE=63 +FIELD=64 +PROPERTY=65 +GET=66 +SET=67 +RECEIVER=68 +PARAM=69 +SETPARAM=70 +DELEGATE=71 +PACKAGE=72 +IMPORT=73 +CLASS=74 +INTERFACE=75 +FUN=76 +OBJECT=77 +VAL=78 +VAR=79 +TYPE_ALIAS=80 +CONSTRUCTOR=81 +BY=82 +COMPANION=83 +INIT=84 +THIS=85 +SUPER=86 +TYPEOF=87 +WHERE=88 +IF=89 +ELSE=90 +WHEN=91 +TRY=92 +CATCH=93 +FINALLY=94 +FOR=95 +DO=96 +WHILE=97 +THROW=98 +RETURN=99 +CONTINUE=100 +BREAK=101 +AS=102 +IS=103 +IN=104 +NOT_IS=105 +NOT_IN=106 +OUT=107 +DYNAMIC=108 +PUBLIC=109 +PRIVATE=110 +PROTECTED=111 +INTERNAL=112 +ENUM=113 +SEALED=114 +ANNOTATION=115 +DATA=116 +INNER=117 +VALUE=118 +TAILREC=119 +OPERATOR=120 +INLINE=121 +INFIX=122 +EXTERNAL=123 +SUSPEND=124 +OVERRIDE=125 +ABSTRACT=126 +FINAL=127 +OPEN=128 +CONST=129 +LATEINIT=130 +VARARG=131 +NOINLINE=132 +CROSSINLINE=133 +REIFIED=134 +EXPECT=135 +ACTUAL=136 +RealLiteral=137 +FloatLiteral=138 +DoubleLiteral=139 +IntegerLiteral=140 +HexLiteral=141 +BinLiteral=142 +UnsignedLiteral=143 +LongLiteral=144 +BooleanLiteral=145 +NullLiteral=146 +CharacterLiteral=147 +Identifier=148 +IdentifierOrSoftKey=149 +FieldIdentifier=150 +QUOTE_OPEN=151 +TRIPLE_QUOTE_OPEN=152 +UNICODE_CLASS_LL=153 +UNICODE_CLASS_LM=154 +UNICODE_CLASS_LO=155 +UNICODE_CLASS_LT=156 +UNICODE_CLASS_LU=157 +UNICODE_CLASS_ND=158 +UNICODE_CLASS_NL=159 +QUOTE_CLOSE=160 +LineStrRef=161 +LineStrText=162 +LineStrEscapedChar=163 +LineStrExprStart=164 +TRIPLE_QUOTE_CLOSE=165 +MultiLineStringQuote=166 +MultiLineStrRef=167 +MultiLineStrText=168 +MultiLineStrExprStart=169 +Inside_Comment=170 +Inside_WS=171 +Inside_NL=172 +ErrorCharacter=173 '...'=6 '.'=7 ','=8 @@ -200,93 +201,94 @@ ErrorCharacter=172 '->'=34 '=>'=35 '..'=36 -'::'=37 -';;'=38 -'#'=39 -'@'=40 -'?'=45 -'<'=46 -'>'=47 -'<='=48 -'>='=49 -'!='=50 -'!=='=51 -'as?'=52 -'=='=53 -'==='=54 -'\''=55 -'&'=56 -'file'=62 -'field'=63 -'property'=64 -'get'=65 -'set'=66 -'receiver'=67 -'param'=68 -'setparam'=69 -'delegate'=70 -'package'=71 -'import'=72 -'class'=73 -'interface'=74 -'fun'=75 -'object'=76 -'val'=77 -'var'=78 -'typealias'=79 -'constructor'=80 -'by'=81 -'companion'=82 -'init'=83 -'this'=84 -'super'=85 -'typeof'=86 -'where'=87 -'if'=88 -'else'=89 -'when'=90 -'try'=91 -'catch'=92 -'finally'=93 -'for'=94 -'do'=95 -'while'=96 -'throw'=97 -'return'=98 -'continue'=99 -'break'=100 -'as'=101 -'is'=102 -'in'=103 -'out'=106 -'dynamic'=107 -'public'=108 -'private'=109 -'protected'=110 -'internal'=111 -'enum'=112 -'sealed'=113 -'annotation'=114 -'data'=115 -'inner'=116 -'value'=117 -'tailrec'=118 -'operator'=119 -'inline'=120 -'infix'=121 -'external'=122 -'suspend'=123 -'override'=124 -'abstract'=125 -'final'=126 -'open'=127 -'const'=128 -'lateinit'=129 -'vararg'=130 -'noinline'=131 -'crossinline'=132 -'reified'=133 -'expect'=134 -'actual'=135 -'null'=145 -'"""'=151 +'..<'=37 +'::'=38 +';;'=39 +'#'=40 +'@'=41 +'?'=46 +'<'=47 +'>'=48 +'<='=49 +'>='=50 +'!='=51 +'!=='=52 +'as?'=53 +'=='=54 +'==='=55 +'\''=56 +'&'=57 +'file'=63 +'field'=64 +'property'=65 +'get'=66 +'set'=67 +'receiver'=68 +'param'=69 +'setparam'=70 +'delegate'=71 +'package'=72 +'import'=73 +'class'=74 +'interface'=75 +'fun'=76 +'object'=77 +'val'=78 +'var'=79 +'typealias'=80 +'constructor'=81 +'by'=82 +'companion'=83 +'init'=84 +'this'=85 +'super'=86 +'typeof'=87 +'where'=88 +'if'=89 +'else'=90 +'when'=91 +'try'=92 +'catch'=93 +'finally'=94 +'for'=95 +'do'=96 +'while'=97 +'throw'=98 +'return'=99 +'continue'=100 +'break'=101 +'as'=102 +'is'=103 +'in'=104 +'out'=107 +'dynamic'=108 +'public'=109 +'private'=110 +'protected'=111 +'internal'=112 +'enum'=113 +'sealed'=114 +'annotation'=115 +'data'=116 +'inner'=117 +'value'=118 +'tailrec'=119 +'operator'=120 +'inline'=121 +'infix'=122 +'external'=123 +'suspend'=124 +'override'=125 +'abstract'=126 +'final'=127 +'open'=128 +'const'=129 +'lateinit'=130 +'vararg'=131 +'noinline'=132 +'crossinline'=133 +'reified'=134 +'expect'=135 +'actual'=136 +'null'=146 +'"""'=152 diff --git a/grammar/src/main/antlr/KotlinParser.g4 b/grammar/src/main/antlr/KotlinParser.g4 index 53356a1f4..bcb4d9494 100644 --- a/grammar/src/main/antlr/KotlinParser.g4 +++ b/grammar/src/main/antlr/KotlinParser.g4 @@ -408,7 +408,7 @@ infixFunctionCall ; rangeExpression - : additiveExpression (RANGE NL* additiveExpression)* + : additiveExpression ((RANGE | RANGE_UNTIL) NL* additiveExpression)* ; additiveExpression From 7fccf8d6ee8210612ee8d55fa2a24fbb7c3ceea9 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Tue, 23 Aug 2022 16:00:32 +0200 Subject: [PATCH 07/22] KT-53646: Add range-until operator as an option for range expressions --- docs/src/md/kotlin.core/expressions.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/src/md/kotlin.core/expressions.md b/docs/src/md/kotlin.core/expressions.md index d41c12542..457c8d7d3 100644 --- a/docs/src/md/kotlin.core/expressions.md +++ b/docs/src/md/kotlin.core/expressions.md @@ -711,15 +711,16 @@ The type of elvis operator expression is the [least upper bound][Least upper bou :::{.paste target=grammar-rule-rangeExpression} ::: -A *range expression* is a binary expression which uses a range operator `..`. -It is an [overloadable][Operator overloading] operator with the following expansion: +A *range expression* is a binary expression which uses a range operator `..` or a range-until operator `..<`. +These are [overloadable][Operator overloading] operators with the following expansions: - `A..B` is exactly the same as `A.rangeTo(B)` +- `A.. Date: Mon, 2 Jan 2023 14:17:05 +0100 Subject: [PATCH 08/22] KT-54254: Refine what "other annotation type" means in allowed annotation properties Specify an annotation type cannot have itself as a nested element, either directly or indirectly --- docs/src/md/kotlin.core/annotations.md | 3 +++ docs/src/md/kotlin.core/declarations.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/src/md/kotlin.core/annotations.md b/docs/src/md/kotlin.core/annotations.md index bdd23d95d..1208d72c1 100644 --- a/docs/src/md/kotlin.core/annotations.md +++ b/docs/src/md/kotlin.core/annotations.md @@ -17,6 +17,9 @@ An annotation type is a special kind of class type which is allowed to include r - Other annotation types; - [Arrays][Array types] of any type listed above. +> Important: when we say "other annotation types", we mean an annotation type cannot reference itself, either directly or indirectly. +> For example, if annotation type `A` references annotation type `B` which references an array of `A`, it is prohibited and reported as a compile-time error. + Annotation classes are not allowed to have any member functions, constructors or mutable properties. They are also not allowed to have declared supertypes and are considered to be implicitly derived from `kotlin.Annotation`. diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index 6827837d8..fac7cede6 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -638,6 +638,9 @@ Annotation classes have the following properties: - Other annotation types; - Arrays of any other allowed type. +> Important: when we say "other annotation types", we mean an annotation type cannot reference itself, either directly or indirectly. +> For example, if annotation type `A` references annotation type `B` which references an array of `A`, it is prohibited and reported as a compile-time error. + > Note: annotation classes can have type parameters, but cannot use them as types for their primary constructor parameters. > Their main use is for various annotation processing tools, which can access the type arguments from the source code. From 4a4768d0b88efb299762e0e5e7d16e4cc3c7cc29 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Mon, 2 Jan 2023 19:18:31 +0100 Subject: [PATCH 09/22] KT-54255: Specify extension receivers are effectively `noinline` --- docs/src/md/kotlin.core/declarations.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index fac7cede6..9b4cf53fb 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -1149,6 +1149,8 @@ They may also be passed to other functions as `noinline` or `crossinline` argume Particular platforms may introduce additional restrictions or guarantees for the inlining mechanism. +> Important: for extension functions, the extension receiver is considered to be effectively `noinline`. + > Examples: > > ```kotlin From efe378ac8cf25f392696bf4eb7782cbbc1fc01d9 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Mon, 22 Aug 2022 22:47:17 +0200 Subject: [PATCH 10/22] Add data object support to grammar --- grammar/src/main/antlr/KotlinParser.g4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammar/src/main/antlr/KotlinParser.g4 b/grammar/src/main/antlr/KotlinParser.g4 index bcb4d9494..06c7ac18c 100644 --- a/grammar/src/main/antlr/KotlinParser.g4 +++ b/grammar/src/main/antlr/KotlinParser.g4 @@ -140,7 +140,7 @@ anonymousInitializer ; companionObject - : modifiers? COMPANION NL* OBJECT + : modifiers? COMPANION NL* DATA? NL* OBJECT (NL* simpleIdentifier)? (NL* COLON NL* delegationSpecifiers)? (NL* classBody)? @@ -596,7 +596,7 @@ functionLiteral ; objectLiteral - : OBJECT (NL* COLON NL* delegationSpecifiers NL*)? (NL* classBody)? + : DATA? NL* OBJECT (NL* COLON NL* delegationSpecifiers NL*)? (NL* classBody)? ; thisExpression From 6eb9f543187990603318223fa208d77c6b25b914 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Tue, 20 Sep 2022 20:53:12 +0200 Subject: [PATCH 11/22] Draft specification for data objects --- docs/src/md/commands.md | 1 + docs/src/md/kotlin.core/declarations.md | 35 +++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/src/md/commands.md b/docs/src/md/commands.md index 6ce3097de..4e4659909 100644 --- a/docs/src/md/commands.md +++ b/docs/src/md/commands.md @@ -82,6 +82,7 @@ \opMathIT{\nested}{nested} \opMathIT{\dataClass}{dataClass} \opMathIT{\dataClassParam}{dp} +\opMathIT{\dataObject}{dataObject} \opMathIT{\name}{name} \opMathIT{\type}{type} diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index 9b4cf53fb..59bd6b678 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -403,8 +403,8 @@ As such, data classes allow Kotlin to reduce the boilerplate and generate a numb - `equals(that)` returns true iff: - `that` has the same runtime type as `this`; - `this.prop == that.prop` returns `true` for every data property `prop`; - - `hashCode()` returns the same numbers for objects `A` and `B` if they are equal w.r.t. the generated `equals`; - - `toString` returns a string representations which is guaranteed to include the class name along with all the data properties' string representations. + - `hashCode()` returns the same numbers for values `A` and `B` if they are equal w.r.t. the generated `equals`; + - `toString()` returns a string representations which is guaranteed to include the class name along with all the data properties' string representations. * A `copy()` function for shallow object copying with the following properties: - It has the same number of parameters as the primary constructor with the same names and types; - It calls the primary constructor with the corresponding parameters at the corresponding positions; @@ -499,6 +499,35 @@ Data classes have the following restrictions: > > Disclaimer: the implementations of these methods given in this examples are not guaranteed to exactly match the ones generated by kotlin compiler, please refer to the descriptions of these methods above for guarantees +##### Data object declaration + +> Note: as of Kotlin $\currentKotlinMajorVersion{}$, this feature is experimental. + +A data object $\dataObject$ is a special kind of [object][Object declaration], which extends the [data class][Data class declaration] abstraction (product type of one or more data properties) to a case of unit type: product type of zero data properties. + +> Note: unit type has only one possible value, thus it is also known as singleton type. + +Similarly to data classes, there are a number of functions with predefined behaviour generated for data objects. + +* `equals() / hashCode() / toString()` functions compliant with [their contracts][`kotlin.Any`-builtins]: + - `equals(that)` returns true iff `that` has the same runtime type as `this`; + - `hashCode()` returns the same numbers for values `A` and `B` if they are equal w.r.t. the generated `equals`; + - `toString()` returns a string representations which is guaranteed to include the object name. + +> Note: `copy()` and `componentN()` functions are not generated, as they are not relevant for a unit type. +> +> * `copy()` function is not needed as unit type has a single possible value; +> * `componentN()` functions are not needed as unit type has no data properties. + +Unlike data classes, however, for data objects the only generated function which can be exemplified or inherited is `toString()`; `equals()` and `hashCode()` for a data object always work as specified above. +This is to ensure data objects do not violate the unit type invariant of "being inhabited by only one value", which would be possible if one were to provide a custom `equals()` implementation. + +If either `equals()` or `hashCode()` function would be exemplified or inherited by a data object, it is a compile-time error. + +Data objects have the same restrictions are regular [objects][Object declaration]. + +> Note: [companion objects][Class declaration] and [object literals][Object literals] cannot be data objects. + #### Enum class declaration Enum class $E$ is a special kind of class with the following properties: @@ -815,6 +844,8 @@ Similarly to interfaces, we shall specify object declarations by highlighting th > Note: this section is about declaration of _named_ objects. > Kotlin also has a concept of _anonymous_ objects, or object literals, which are similar to their named counterparts, but are expressions rather than declarations and, as such, are described in the [corresponding section][Object literals]. +> Note: besides regular object declarations, Kotlin supports [data object declarations][Data object declaration]. + #### Local class declaration A class (but not an interface or an object) may be declared *locally* inside a [statement scope][Scopes and identifiers] (namely, inside a function). From 5850658492c451ed51c08843931c144f3aa126d4 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Wed, 26 Jul 2023 16:07:51 +0200 Subject: [PATCH 12/22] [1.9] Add new grammar tests --- ...onCalledAsExtension.reversed.antlrtree.txt | 204 + .../abstractClassReference.antlrtree.txt | 124 + .../ambiguityNamedVararg.antlrtree.txt | 384 ++ ...ArgumentWithAliasedArrayType.antlrtree.txt | 53 + .../AnnotatedNullableTypes.antlrtree.txt | 272 + .../InheritingAnnotationClass.antlrtree.txt | 33 + ...tatedGlobalFunction.reversed.antlrtree.txt | 164 + .../annotationsOnDataClassCopy.antlrtree.txt | 325 + ...lassWithIt.foo_AnotherTarget.antlrtree.txt | 49 + ...tRetentionWithExplicitImport.antlrtree.txt | 84 + ...hOnOverrideJavaNullable.ll.k.antlrtree.txt | 372 ++ .../javaRepeatableInKotlin.antlrtree.txt | 116 + ...eSiteGetTargetAnnotationsOff.antlrtree.txt | 345 + ...seSiteGetTargetAnnotationsOn.antlrtree.txt | 345 + ...itializedEffectivelyFinalOff.antlrtree.txt | 147 + ...nitializedEffectivelyFinalOn.antlrtree.txt | 147 + ...rtialDeferredInitErrorAnyway.antlrtree.txt | 143 + ...ondaryConstructorErrorAnyway.antlrtree.txt | 146 + ...ndaryConstructorsErrorAnyway.antlrtree.txt | 106 + .../ValDeferredInitInFinalClass.antlrtree.txt | 1364 ++++ ...dInitInOpenClassOpenValError.antlrtree.txt | 1165 ++++ ...nitInOpenClassOpenValWarning.antlrtree.txt | 1165 ++++ .../ValWithSetterDeferredInit.antlrtree.txt | 95 + .../VarDeferredInitInFinalClass.antlrtree.txt | 5163 +++++++++++++++ .../VarDeferredInitInOpenClass.antlrtree.txt | 4423 +++++++++++++ ...imaryConstructor_errorAnyway.antlrtree.txt | 89 + ...ndary_mustBeInitializedError.antlrtree.txt | 155 + ...ary_mustBeInitializedWarning.antlrtree.txt | 155 + ...ndary_mustBeInitializedError.antlrtree.txt | 90 + ...ary_mustBeInitializedWarning.antlrtree.txt | 90 + ...ndary_mustBeInitializedError.antlrtree.txt | 96 + ...ary_mustBeInitializedWarning.antlrtree.txt | 96 + ...Error_mustBeInitializedError.antlrtree.txt | 90 + ...ror_mustBeInitializedWarning.antlrtree.txt | 90 + ...rning_mustBeInitializedError.antlrtree.txt | 90 + ...ing_mustBeInitializedWarning.antlrtree.txt | 90 + ...enVar_mustBeInitializedError.antlrtree.txt | 90 + ...Var_mustBeInitializedWarning.antlrtree.txt | 90 + ...dInitInSecondary_errorAnyway.antlrtree.txt | 153 + ...InTwoSecondaries_errorAnyway.antlrtree.txt | 113 + ...ndary_mustBeInitializedError.antlrtree.txt | 114 + ...ary_mustBeInitializedWarning.antlrtree.txt | 114 + ...ary_oneSecondary_errorAnyway.antlrtree.txt | 118 + ...ationByExpectTypeOutsideCall.antlrtree.txt | 1275 ++++ .../adaptationInWhenWithMapOf.antlrtree.txt | 204 + ...ionToOverridenWithoutDefault.antlrtree.txt | 412 ++ .../noKFunctionForAdaptation.antlrtree.txt | 760 +++ ...impleAdaptationOutsideOfCall.antlrtree.txt | 231 + ...ReferencesToCompanionMembers.antlrtree.txt | 218 + ...velReferenceWithCompanionLHS.antlrtree.txt | 2115 ++++++ .../generic/boundViolated.antlrtree.txt | 218 + ...correctNumberOfTypeArguments.antlrtree.txt | 319 + .../genericTypealiasInLhs.antlrtree.txt | 5849 +++++++++++++++++ ...mutablePropertyViaDelegation.antlrtree.txt | 380 ++ ...referenceInCycleInProperties.antlrtree.txt | 455 ++ ...nputTypesOnCallableReference.antlrtree.txt | 313 + .../classLiteralsWithEmptyLHS.antlrtree.txt | 220 + ...OverridesKotlinProperty.Main.antlrtree.txt | 93 + ...iaIntermediateJavaClass.Main.antlrtree.txt | 93 + ...pertiesOnJavaAnnotation.Main.antlrtree.txt | 37 + .../cast/AsInCompoundAssignment.antlrtree.txt | 139 + .../kt51062Error.main.antlrtree.txt | 859 +++ .../checkTypeWithExactTest.antlrtree.txt | 469 ++ .../parameterizedTypeAlias.antlrtree.txt | 1409 ++++ .../comparingArbitraryClasses.antlrtree.txt | 134 + ...WithInstanceOfJavaClass.Main.antlrtree.txt | 306 + ...ricInterfaceWithGenericClass.antlrtree.txt | 123 + ...nsideDelegationCallNoPrimary.antlrtree.txt | 118 + ...ertiesFromPrimaryConstructor.antlrtree.txt | 555 ++ .../twoSuperTypeCalls.antlrtree.txt | 135 + ...BaseEnumInitSection_function.antlrtree.txt | 4133 ++++++++++++ ...BaseEnumInitSection_property.antlrtree.txt | 3826 +++++++++++ ...istentNullability.KotlinBase.antlrtree.txt | 65 + ...InconsistentNullability.main.antlrtree.txt | 378 ++ ...edVariableInNonInPlaceLambda.antlrtree.txt | 1808 +++++ .../cfgOfFullyIncorrectCode.antlrtree.txt | 41 + ...tializationInUnreachableCode.antlrtree.txt | 178 + ...assignementInUnreachableCode.antlrtree.txt | 86 + ...returnAliasedUnitNotRequired.antlrtree.txt | 119 + .../singleReturnFromTry.antlrtree.txt | 711 ++ ...elegatedConstructorArguments.antlrtree.txt | 482 ++ ...atedMemberProperyWriteInInit.antlrtree.txt | 707 ++ ...BreakContinueFeatureDisabled.antlrtree.txt | 1291 ++++ .../reassignmentInCatch.antlrtree.txt | 295 + ...lAfterVariableInitialization.antlrtree.txt | 138 + .../smartCastInCatch.antlrtree.txt | 472 ++ ...rectAndDelayedInitialization.antlrtree.txt | 247 + .../continueInInitBlock.antlrtree.txt | 123 + ...WithIncorrectTypeSpecializer.antlrtree.txt | 222 + .../incorrectElvis.antlrtree.txt | 84 + .../whenWithNoSubjectAndCommas.antlrtree.txt | 74 + .../kotlinJavaKotlinCycle.ll.I.antlrtree.txt | 50 + .../kotlinJavaKotlinCycle.ll.K.antlrtree.txt | 49 + ...tedCycle.ll.ExceptionTracker.antlrtree.txt | 30 + ...estedCycle.ll.StorageManager.antlrtree.txt | 37 + .../inference/decoratedLambda.antlrtree.txt | 356 + .../inference/elvisInDelegated.antlrtree.txt | 435 ++ .../inference/ifInDelegated.antlrtree.txt | 499 ++ .../inference/kt41952.antlrtree.txt | 521 ++ ...dPartiallyResolvedCalls.main.antlrtree.txt | 313 + ...PartiallyResolvedCallsSimple.antlrtree.txt | 421 ++ ...ullAssertionInLocalDelegated.antlrtree.txt | 401 ++ .../inference/tryInGenerated.antlrtree.txt | 425 ++ ...eFromGetValueThroughSetValue.antlrtree.txt | 559 ++ ...InferenceFromWrappedDelegate.antlrtree.txt | 364 + ...ferenceForImplicitlyTypedVar.antlrtree.txt | 595 ++ ...ullAssertionInLocalDelegated.antlrtree.txt | 634 ++ .../provideDelegate/onObject.antlrtree.txt | 217 + .../recursiveType.reversed.antlrtree.txt | 285 + .../delegation/kt49477.reversed.antlrtree.txt | 940 +++ .../kt49477Error.reversed.antlrtree.txt | 941 +++ .../delegationTypeMismatch.antlrtree.txt | 187 + ...edCompanionAndClassReference.antlrtree.txt | 140 + ...recatedConstructorProperty.A.antlrtree.txt | 129 + ...catedConstructorProperty.use.antlrtree.txt | 125 + .../deprecatedEnumEntry.A.antlrtree.txt | 66 + .../deprecatedEnumEntry.use.antlrtree.txt | 75 + .../deprecatedField.use.antlrtree.txt | 86 + ...tyShadowsBaseClassField.test.antlrtree.txt | 170 + ...entNumericTypesFromSmartCast.antlrtree.txt | 197 + ...gPropertyEntriesAndReference.antlrtree.txt | 233 + ...ropertyEntriesAndReferenceOn.antlrtree.txt | 234 + ...triesAndReferencePrioritized.antlrtree.txt | 234 + ...riesPropertyAsExtensionClash.antlrtree.txt | 409 ++ ...esPropertyAsExtensionClashOn.antlrtree.txt | 412 ++ ...yAsExtensionClashPrioritized.antlrtree.txt | 412 ++ ...entriesPropertyImportedClash.antlrtree.txt | 207 + ...triesPropertyImportedClashOn.antlrtree.txt | 208 + ...ertyImportedClashPrioritized.antlrtree.txt | 208 + ...riesPropertyInCompanionClash.antlrtree.txt | 410 ++ ...esPropertyInCompanionClashOn.antlrtree.txt | 411 ++ ...esPropertyWithJvmStaticClash.antlrtree.txt | 227 + ...PropertyWithJvmStaticClashOn.antlrtree.txt | 228 + ...ithJvmStaticClashPrioritized.antlrtree.txt | 228 + .../entries/entriesUnsupported.antlrtree.txt | 76 + .../enumEntriesAmbiguity.antlrtree.txt | 75 + .../genericEntriesPropertyClash.antlrtree.txt | 172 + ...enericEntriesPropertyClashOn.antlrtree.txt | 173 + ...avaEnumEntriesAmbiguity.test.antlrtree.txt | 103 + ...aEnumEntriesAmbiguityOn.test.antlrtree.txt | 179 + .../javaFakeEnumEntries.test.antlrtree.txt | 157 + ...ngOfExternallyDefinedEntries.antlrtree.txt | 353 + ...OfExternallyDefinedEntriesOn.antlrtree.txt | 396 ++ ...llyDefinedEntriesPrioritized.antlrtree.txt | 396 ++ ...EnumEntriesNameWithIntrinsic.antlrtree.txt | 98 + ...umEntriesNameWithIntrinsicOn.antlrtree.txt | 113 + .../equalityOfEnumAndParameter.antlrtree.txt | 1415 ++++ ...tyOfFlexibleTypeParameters.B.antlrtree.txt | 191 + .../enum/referenceToEnumEntry.antlrtree.txt | 74 + .../equalityComparisonToSelf.antlrtree.txt | 114 + ...ualityWithSmartCastInIfBlock.antlrtree.txt | 223 + ...ntextReceiversOnValueClasses.antlrtree.txt | 169 + .../twoReceiverCandidatesError.antlrtree.txt | 227 + ...tyShadowsBaseClassField.test.antlrtree.txt | 598 ++ ...ShadowsBaseClassField13.test.antlrtree.txt | 476 ++ ...inPropertyDifferentType.Main.antlrtree.txt | 204 + ...nPropertyDifferentType2.Main.antlrtree.txt | 102 + ...yJavaFieldInPackagePrivate.B.antlrtree.txt | 76 + ...vaFieldInPackagePrivate.test.antlrtree.txt | 78 + ...rtyJavaPackagePrivateField.B.antlrtree.txt | 76 + ...JavaPackagePrivateField.test.antlrtree.txt | 78 + ...isiblePropertyReference.Base.antlrtree.txt | 217 + ...blePropertyReference.Derived.antlrtree.txt | 849 +++ .../diagnostics/finalSupertype.antlrtree.txt | 52 + .../diagnostics/funReturnsAny.antlrtree.txt | 52 + .../functionLiterals/kt56138.antlrtree.txt | 1122 ++++ .../approximationOfInProjection.antlrtree.txt | 296 + .../nullableTypeParameterScope.antlrtree.txt | 308 + ...ypeParametersInNestedClasses.antlrtree.txt | 445 ++ ...etterProjectedOutAssign.test.antlrtree.txt | 483 ++ ...rentWithDifferentNameComplex.antlrtree.txt | 415 ++ .../imports/brokenImport.Klass.antlrtree.txt | 173 + .../imports/brokenImport.test.antlrtree.txt | 114 + ...dImportInDifferentFile.first.antlrtree.txt | 53 + ...edImportInDifferentFile.main.antlrtree.txt | 134 + .../incompleteCode/kt59041.antlrtree.txt | 56 + ...entDecrementOnFullyQualified.antlrtree.txt | 98 + .../incrementDecrementOnObject.antlrtree.txt | 293 + ...rgumentsWithProperExpectType.antlrtree.txt | 1055 +++ ...versionLastStatementInLambda.antlrtree.txt | 530 ++ .../callableReferences/kt55931.antlrtree.txt | 686 ++ .../callableReferences/kt56227.antlrtree.txt | 582 ++ ...onLeavesNonTrivialLowerBound.antlrtree.txt | 474 ++ ...ptureFromNullableTypeInScope.antlrtree.txt | 226 + ...reFromNullableTypeInScopeAny.antlrtree.txt | 170 + .../differentCapturedTypes.antlrtree.txt | 287 + .../afterBareReturn.antlrtree.txt | 1028 +++ .../coercionToUnit/nestedLambda.antlrtree.txt | 377 ++ .../inference/elvisInsideWhen.antlrtree.txt | 492 ++ .../emptyIntersectionOnIf.antlrtree.txt | 166 + .../kt54411.antlrtree.txt | 449 ++ .../inference/exclExclInference.antlrtree.txt | 357 + ...tedCallVariableFixation.main.antlrtree.txt | 252 + ...edCallVariableFixationSimple.antlrtree.txt | 850 +++ ...bdaReturnTypeAndExpectedType.antlrtree.txt | 1127 ++++ .../genericCallInThrow.antlrtree.txt | 111 + .../ifWithDependentBranches.antlrtree.txt | 1784 +++++ .../inferenceForkRegression.antlrtree.txt | 254 + ...nferenceForkRegressionSimple.antlrtree.txt | 270 + .../nothingType/kt56448.main.antlrtree.txt | 847 +++ ...eturnAsLastStatementInLambda.antlrtree.txt | 718 ++ .../nothingType/selectWithNull.antlrtree.txt | 301 + .../nothingVsParameterBound.antlrtree.txt | 210 + .../nullableArgumentForDnn.antlrtree.txt | 250 + ...TypeMismatch_withProper.Main.antlrtree.txt | 93 + ...eMismatch_withoutProper.Main.antlrtree.txt | 93 + .../kt23531.reversed.antlrtree.txt | 623 ++ .../smartCastForkForExpectType.antlrtree.txt | 796 +++ ...astForkForExpectedTypeNested.antlrtree.txt | 924 +++ .../nonPublicMember/kt55179.antlrtree.txt | 256 + ...rotectedInlineInsideInternal.antlrtree.txt | 148 + ...eTypeInPrivateInlineFunction.antlrtree.txt | 92 + .../returnedAnonymousObjects_2.antlrtree.txt | 4396 +++++++++++++ .../inline/valueClasses.antlrtree.txt | 253 + .../inline/virtualValInEnum.antlrtree.txt | 228 + ...qualsOverridingInInlineClass.antlrtree.txt | 680 ++ .../lateinitInlineClassesOff.antlrtree.txt | 90 + .../lateinitInlineClassesOn.antlrtree.txt | 1380 ++++ ...onstructorsBodyInKotlinPre19.antlrtree.txt | 152 + ...ualsOperatorDeclarationCheck.antlrtree.txt | 945 +++ ...peratorModifierInInlineClass.antlrtree.txt | 303 + ...eDeprecationsOnImplicitCalls.antlrtree.txt | 648 ++ ...ssTypeParameterNameCollision.antlrtree.txt | 207 + ...omplexMapping.complexMapping.antlrtree.txt | 897 +++ .../literalInCompletedGeneric.antlrtree.txt | 252 + .../integerLiterals/sortedBy.antlrtree.txt | 510 ++ .../integerLiterals/vararg.antlrtree.txt | 686 ++ ...isibleClassInsteadOfFun.Main.antlrtree.txt | 140 + ...Fun.pagind_QueryPagingSource.antlrtree.txt | 90 + ...invisibleMemberDestructuring.antlrtree.txt | 116 + .../nonDirectHiddenOverride.antlrtree.txt | 404 ++ .../j+k/javaLangStringCtr.antlrtree.txt | 182 + .../j+k/kt60580.usage.antlrtree.txt | 206 + .../j+k/ktij24272.use.antlrtree.txt | 154 + .../j+k/nullForOptionalOf.antlrtree.txt | 100 + ...ltiModule.KIntermediateClass.antlrtree.txt | 389 ++ ...rtyAndSetterMultiModule.Main.antlrtree.txt | 287 + ...ypeToAnonymousFunction.usage.antlrtree.txt | 114 + .../properties/unitVsVoid.main.antlrtree.txt | 329 + .../rawTypesFromCaptured.test.antlrtree.txt | 272 + ...pesFromCapturedOriginal.test.antlrtree.txt | 320 + ...itanceThroughEmptyClass.main.antlrtree.txt | 70 + ...ticImportViaInheritance.test.antlrtree.txt | 106 + ....LiveAllocationCaptureObject.antlrtree.txt | 100 + ...LiveAllocationInstanceObject.antlrtree.txt | 91 + ...rtyOverridden.KtCodeFragment.antlrtree.txt | 168 + ....DeserializedClassDescriptor.antlrtree.txt | 300 + ...PropertyOverridden2.Modality.antlrtree.txt | 26 + ....DeserializedClassDescriptor.antlrtree.txt | 300 + ...verridden2.reversed.Modality.antlrtree.txt | 26 + .../diagnostics/kt46483.antlrtree.txt | 342 + .../diagnostics/kt53988.antlrtree.txt | 49 + .../diagnostics/kt54587_1.antlrtree.txt | 174 + .../diagnostics/kt54587_2.antlrtree.txt | 183 + .../diagnostics/kt55181.antlrtree.txt | 66 + .../diagnostics/kt55666.antlrtree.txt | 286 + .../diagnostics/kt55733.antlrtree.txt | 106 + .../diagnostics/kt56612.antlrtree.txt | 456 ++ .../diagnostics/kt56665.antlrtree.txt | 122 + .../diagnostics/kt56723.antlrtree.txt | 2102 ++++++ .../diagnostics/kt56769.antlrtree.txt | 498 ++ .../diagnostics/kt56876.antlrtree.txt | 492 ++ .../diagnostics/kt56877.antlrtree.txt | 978 +++ .../diagnostics/kt57085.antlrtree.txt | 137 + .../diagnostics/kt57175.antlrtree.txt | 48 + .../diagnostics/kt57214.A.antlrtree.txt | 96 + .../diagnostics/kt57214.B.antlrtree.txt | 91 + .../kt58583.DialogWrapper.antlrtree.txt | 44 + .../diagnostics/kt58583.Main.antlrtree.txt | 117 + .../diagnostics/kt60638.antlrtree.txt | 128 + .../labels/labelToOuterLambda.antlrtree.txt | 658 ++ .../missingIteratorMissing.antlrtree.txt | 120 + .../const/enumConstName_after.antlrtree.txt | 212 + .../const/enumConstName_before.antlrtree.txt | 213 + .../enumJavaName_after.main.antlrtree.txt | 47 + .../const/equals_after.antlrtree.txt | 2162 ++++++ .../const/equals_before.antlrtree.txt | 2162 ++++++ .../const/ifConstVal_after.antlrtree.txt | 1001 +++ .../const/ifConstVal_before.antlrtree.txt | 1002 +++ .../const/kCallable_after.antlrtree.txt | 585 ++ .../const/kCallable_before.antlrtree.txt | 586 ++ .../const/stringConcatenation.antlrtree.txt | 522 ++ ...tringConcatenationWithObject.antlrtree.txt | 411 ++ .../protectedInExpectActual.antlrtree.txt | 365 + .../suspendAnonymousFunction.antlrtree.txt | 36 + .../dependsOnModule.a.antlrtree.txt | 282 + .../dependsOnModule.b.antlrtree.txt | 308 + .../dependsOnModule.c.antlrtree.txt | 305 + .../multimodule/friendModule.a.antlrtree.txt | 282 + .../multimodule/friendModule.b.antlrtree.txt | 306 + .../friendModulePrivate.a.antlrtree.txt | 282 + .../friendModulePrivate.b.antlrtree.txt | 306 + ...asToSpecialAnnotation.common.antlrtree.txt | 88 + ...aliasToSpecialAnnotation.jvm.antlrtree.txt | 193 + ...mentsConstExpressions.common.antlrtree.txt | 1570 +++++ ...rgumentsConstExpressions.jvm.antlrtree.txt | 1249 ++++ ...tionArgumentsDefaults.common.antlrtree.txt | 101 + ...otationArgumentsDefaults.jvm.antlrtree.txt | 33 + .../annotationTarget.common.antlrtree.txt | 399 ++ .../annotationTarget.jvm.antlrtree.txt | 477 ++ ...otationTypeParameters.common.antlrtree.txt | 766 +++ ...annotationTypeParameters.jvm.antlrtree.txt | 672 ++ .../basicOnDeclaration.common.antlrtree.txt | 146 + .../basicOnDeclaration.jvm.antlrtree.txt | 157 + ...eckDiagnosticFullText.common.antlrtree.txt | 126 + .../checkDiagnosticFullText.jvm.antlrtree.txt | 104 + .../compatibleOverrides.common.antlrtree.txt | 80 + .../compatibleOverrides.jvm.antlrtree.txt | 73 + .../differentOrder.common.antlrtree.txt | 276 + .../differentOrder.jvm.antlrtree.txt | 183 + .../fakeOverrides.common.antlrtree.txt | 161 + .../fakeOverrides.jvm.antlrtree.txt | 131 + ...loatNumbersComparison.common.antlrtree.txt | 80 + .../floatNumbersComparison.jvm.antlrtree.txt | 74 + ...rinsicConstEvaluation.common.antlrtree.txt | 157 + ...nstrinsicConstEvaluation.jvm.antlrtree.txt | 132 + ...assArgWithExpectClass.common.antlrtree.txt | 240 + ...kclassArgWithExpectClass.jvm.antlrtree.txt | 213 + ...uesForJavaAnnotations.common.antlrtree.txt | 112 + ...loguesForJavaAnnotations.jvm.antlrtree.txt | 44 + .../skippedAnnotations.common.antlrtree.txt | 368 ++ .../skippedAnnotations.jvm.antlrtree.txt | 82 + ...otationsWhenTypealias.common.antlrtree.txt | 127 + ...AnnotationsWhenTypealias.jvm.antlrtree.txt | 77 + .../typealias.common.antlrtree.txt | 124 + .../typealias.jvm.antlrtree.txt | 69 + ...ypealiasToJavaLibrary.common.antlrtree.txt | 112 + .../typealiasToJavaLibrary.jvm.antlrtree.txt | 59 + .../typealiasToKtLibrary.common.antlrtree.txt | 626 ++ .../typealiasToKtLibrary.jvm.antlrtree.txt | 87 + ...OtherIncomatibilities.common.antlrtree.txt | 107 + ...ithOtherIncomatibilities.jvm.antlrtree.txt | 91 + ...ualForExpectInLastModule.jvm.antlrtree.txt | 16 + ...rgsViaActualTypealias.common.antlrtree.txt | 100 + ...ltArgsViaActualTypealias.jvm.antlrtree.txt | 114 + ...ClassWithDefaultValue.common.antlrtree.txt | 110 + ...ineClassWithDefaultValue.jvm.antlrtree.txt | 131 + ...rgsViaActualTypealias.common.antlrtree.txt | 332 + ...ltArgsViaActualTypealias.jvm.antlrtree.txt | 352 + ...xpectAbstractToString.common.antlrtree.txt | 119 + .../expectAbstractToString.jvm.antlrtree.txt | 153 + .../expectExternal.common.antlrtree.txt | 175 + .../expectExternal.jvm.antlrtree.txt | 183 + ...expectOptInAnnotation.common.antlrtree.txt | 117 + .../expectOptInAnnotation.jvm.antlrtree.txt | 76 + .../expectTailrec.common.antlrtree.txt | 178 + .../expectTailrec.jvm.antlrtree.txt | 385 ++ ...alMethodInExpectClass.common.antlrtree.txt | 38 + ...ctualMethodInExpectClass.jvm.antlrtree.txt | 41 + .../expectFunInterface.common.antlrtree.txt | 215 + .../expectFunInterface.main.antlrtree.txt | 243 + ...ctualHasAdditionalSupertypes.antlrtree.txt | 340 + .../multiplatform/hmpp/kt-55570.antlrtree.txt | 21 + .../kt57320.StringDemoInterface.antlrtree.txt | 131 + .../hmpp/kt57320.StringValue.antlrtree.txt | 128 + .../hmpp/kt57320.main.antlrtree.txt | 110 + ...pectAndActualInTheSameModule.antlrtree.txt | 825 +++ ...eSameModuleIncompatibilities.antlrtree.txt | 457 ++ ...ermediateWithActualAndExpect.antlrtree.txt | 85 + ...torsInComplexModuleStructure.antlrtree.txt | 142 + ...incDecOperatorsInExpectClass.antlrtree.txt | 91 + ...aActualizationAllowed.common.antlrtree.txt | 97 + ...tualizationDisallowed.common.antlrtree.txt | 38 + ...ation_multipleActuals.common.antlrtree.txt | 48 + ...lization_multipleActuals.jvm.antlrtree.txt | 53 + .../inheritedJavaMembers.common.antlrtree.txt | 1550 +++++ .../inheritedJavaMembers.jvm.antlrtree.txt | 1566 +++++ .../kt54827.common.antlrtree.txt | 40 + .../multiplatform/kt54827.jvm.antlrtree.txt | 41 + .../kt58153.common.antlrtree.txt | 95 + .../kt58153.platform.antlrtree.txt | 66 + ...lMemberNotImplemented.common.antlrtree.txt | 162 + ...mplMemberNotImplemented.main.antlrtree.txt | 149 + ...sMemberNotImplemented.common.antlrtree.txt | 80 + ...cesMemberNotImplemented.main.antlrtree.txt | 71 + ...erfacesImplementation.common.antlrtree.txt | 119 + ...facesImplementation.platform.antlrtree.txt | 107 + ...ithPrivateConstructor.common.antlrtree.txt | 30 + ...ssWithPrivateConstructor.jvm.antlrtree.txt | 28 + ...upertypeActualizationWithAny.antlrtree.txt | 74 + .../varSetterVisibility.common.antlrtree.txt | 153 + .../varSetterVisibility.jvm.antlrtree.txt | 283 + ...VisibilityInActualClassifier.antlrtree.txt | 336 + ...ForDelegationToJavaMethods.1.antlrtree.txt | 150 + .../disallowForFunctionTypes.antlrtree.txt | 97 + ...oLibraryProvidersDuplication.antlrtree.txt | 193 + ...yProvidersDuplicationWithMpp.antlrtree.txt | 196 + ...rovidersDuplicationInDiamond.antlrtree.txt | 88 + ...usedOnDelegationWithProvider.antlrtree.txt | 459 ++ .../nullableTypes/kt58844.antlrtree.txt | 292 + ...essComparasionAfterSmartcast.antlrtree.txt | 399 ++ ...olveInFunctionReturnPosition.antlrtree.txt | 612 ++ .../diagnostics/numbers/kt45970.antlrtree.txt | 1904 ++++++ .../diagnostics/numbers/kt48361.antlrtree.txt | 115 + ...sOperatorOverrideHierarchies.antlrtree.txt | 670 ++ ...orJavaSyntheticProperty.main.antlrtree.txt | 93 + .../doubleWinsOverFloat.antlrtree.txt | 349 + ...WithDifferentParameterNumber.antlrtree.txt | 252 + ...oadsFromCurrentAndSuperClass.antlrtree.txt | 422 ++ ...tAndSuperClassWithReturnType.antlrtree.txt | 411 ++ ...TypeInOverrideSignature.Main.antlrtree.txt | 24 + .../InternalPotentialOverride.A.antlrtree.txt | 141 + .../InternalPotentialOverride.B.antlrtree.txt | 147 + .../conflictingInherited.antlrtree.txt | 546 ++ .../derivedClasses/Constructor.antlrtree.txt | 177 + .../DelegatedConstructor.antlrtree.txt | 101 + .../derivedClasses/EnumValues.antlrtree.txt | 85 + .../derivedClasses/Instance.antlrtree.txt | 120 + .../StaticFieldFromJava.k.antlrtree.txt | 57 + .../StaticMethodFromJava.k.antlrtree.txt | 85 + .../diamondWithDiagonal.antlrtree.txt | 211 + .../override/kt53408.antlrtree.txt | 201 + ...vaInterfaceWithDelegation.CK.antlrtree.txt | 21 + ...InterfaceWithDelegation.test.antlrtree.txt | 298 + ...linInterfaceWithDelegation.A.antlrtree.txt | 34 + ...linInterfaceWithDelegation.B.antlrtree.txt | 21 + ...linInterfaceWithDelegation.C.antlrtree.txt | 21 + ...InterfaceWithDelegation.test.antlrtree.txt | 209 + ...varImplementedByInheritedVal.antlrtree.txt | 499 ++ ...plementedByInheritedValError.antlrtree.txt | 499 ++ .../overrideNotNull_Fail.antlrtree.txt | 197 + .../overrideNotNull_Ok.antlrtree.txt | 200 + .../javaMappedCtors.antlrtree.txt | 871 +++ .../supplier.KotlinMain.antlrtree.txt | 294 + ...etersFromKotlin.reversed.Foo.antlrtree.txt | 167 + ...tersFromKotlin.reversed.main.antlrtree.txt | 59 + .../lostRawTypeAfterElvis.main.antlrtree.txt | 168 + ...entsForRawScopedMembers.main.antlrtree.txt | 252 + ...onProjectedInnerErasure.main.antlrtree.txt | 185 + ...edInnerErasure.reversed.main.antlrtree.txt | 185 + .../nonRawArraysInRawType.main.antlrtree.txt | 205 + ...TypeSyntheticExtensions.main.antlrtree.txt | 298 + ...ToClassWithRawSupertype.main.antlrtree.txt | 251 + .../prefixIncReturnType.antlrtree.txt | 207 + .../prefixIncSmartCast.antlrtree.txt | 214 + .../constAnnotationCycle.antlrtree.txt | 99 + .../inferPropertyTypeFromGetter.antlrtree.txt | 263 + .../properties/kt56707.antlrtree.txt | 242 + .../localPropertyExtensions.antlrtree.txt | 57 + ...rawCastToStarProjection_Fail.antlrtree.txt | 139 + .../rawCastToStarProjection_Ok.antlrtree.txt | 152 + .../kt57620.ProjectMain.antlrtree.txt | 237 + ...lutionInDelegatedConstructor.antlrtree.txt | 558 ++ ...rationInDifferentFiles.ll.f1.antlrtree.txt | 28 + ...rationInDifferentFiles.ll.f2.antlrtree.txt | 25 + .../RedeclaredValsAndVars.antlrtree.txt | 557 ++ .../referenceToParameterizedFun.antlrtree.txt | 138 + ...ealiasInsteadOfProperty.main.antlrtree.txt | 81 + ...pealiasInsteadOfProperty.pkg.antlrtree.txt | 35 + ...nionPropertyAndTypeParameter.antlrtree.txt | 838 +++ .../resolve/errorPriority.test.antlrtree.txt | 165 + ...oidTypeCheckerRecursion.main.antlrtree.txt | 260 + .../closeInvokesFarVariable.antlrtree.txt | 276 + .../closerVariableMatterMore.antlrtree.txt | 297 + ...completePropertyBeforeInvoke.antlrtree.txt | 377 ++ ...itAndInvokeExtensionPriority.antlrtree.txt | 288 + .../invoke/implicitPropertyType.antlrtree.txt | 176 + .../invoke/invokeCommonSystem.antlrtree.txt | 324 + .../invoke/invokeCommonSystem2.antlrtree.txt | 483 ++ .../resolve/invoke/kt51793.antlrtree.txt | 209 + .../invoke/kt51793Complex.antlrtree.txt | 566 ++ .../filteringOutOverrides.antlrtree.txt | 728 ++ .../overloadConflicts/kt55722.antlrtree.txt | 279 + .../kt55722Initial.antlrtree.txt | 226 + .../priority/extensionVsMember.antlrtree.txt | 212 + ...CallOnFlexibleTypeAlias.main.antlrtree.txt | 166 + .../samConversionWithCondition.antlrtree.txt | 1394 ++++ ...ersionWithConditionJava.main.antlrtree.txt | 320 + ...sionWithSafeCallAndInference.antlrtree.txt | 194 + ...AccessFromDeriviedClass.base.antlrtree.txt | 67 + ...ssFromDeriviedClass.derived1.antlrtree.txt | 362 + ...ssFromDeriviedClass.derived2.antlrtree.txt | 308 + ...cessFromDeriviedClassOn.base.antlrtree.txt | 67 + ...FromDeriviedClassOn.derived1.antlrtree.txt | 362 + ...FromDeriviedClassOn.derived2.antlrtree.txt | 310 + .../dataClassCopy.antlrtree.txt | 272 + ...nterdependentStarProjections.antlrtree.txt | 647 ++ ...rianceAndCovariantProjection.antlrtree.txt | 982 +++ .../complexExpression.antlrtree.txt | 148 + .../implicitThisOrLocalVar.antlrtree.txt | 678 ++ .../capturedSpecificity.antlrtree.txt | 418 ++ .../intersectReturnType.antlrtree.txt | 602 ++ .../smartCasts/kt45814.antlrtree.txt | 498 ++ .../accessThrowOtherModule.antlrtree.txt | 309 + ...PropertyFromInvisibleClass.A.antlrtree.txt | 33 + ...PropertyFromInvisibleClass.B.antlrtree.txt | 330 + ...romInvisibleClassForbidden.A.antlrtree.txt | 33 + ...romInvisibleClassForbidden.B.antlrtree.txt | 330 + .../smartcastInFriendModule.antlrtree.txt | 530 ++ .../smartcastToStarProjection.antlrtree.txt | 444 ++ .../capturedLoopVariable.antlrtree.txt | 2249 +++++++ .../capturedWithControlJumps.antlrtree.txt | 2309 +++++++ .../localDelegatedProperty.antlrtree.txt | 238 + .../variables/objectMembers.antlrtree.txt | 2829 ++++++++ .../reassignedDependency.antlrtree.txt | 2326 +++++++ ...eassignedDependency_unstable.antlrtree.txt | 2090 ++++++ .../variables/reassignedInRhs.antlrtree.txt | 1416 ++++ .../delegatedConstructor.bar.antlrtree.txt | 73 + .../delegatedConstructor.foo.antlrtree.txt | 76 + .../delegatedConstructor.lib.antlrtree.txt | 37 + .../subtyping/kFunctionalCST.antlrtree.txt | 865 +++ ...ndExtFunctionTypeAsSuperType.antlrtree.txt | 662 ++ ...AsSuperTypeRestrictionLifted.antlrtree.txt | 664 ++ ...sedPropertyTypeInConstructor.antlrtree.txt | 224 + ...ertyTypeInPrivateConstructor.antlrtree.txt | 236 + ...suspendAnonymousAsNonSuspend.antlrtree.txt | 105 + ...pendCallFromAnonymousSuspend.antlrtree.txt | 61 + ...dFunctionExpectedTypeAndWhen.antlrtree.txt | 410 ++ ...PropertyReference.KotlinFile.antlrtree.txt | 128 + ...terFromGenericJavaClass.main.antlrtree.txt | 273 + .../syntheticSet.test.antlrtree.txt | 2949 +++++++++ ...ntheticSetFalsePositive.main.antlrtree.txt | 157 + .../kt56505.antlrtree.txt | 231 + ...explicitSuperConstructorCall.antlrtree.txt | 396 ++ ...rdWithExplicitComponent.main.antlrtree.txt | 167 + .../javaRecordWithGeneric.main.antlrtree.txt | 518 ++ ...cordsDefaultConstructor.main.antlrtree.txt | 94 + ...ithSecondaryConstructor.main.antlrtree.txt | 166 + ...flexibleSealedInSubject.main.antlrtree.txt | 766 +++ ...ssNotAccessibleFromInterface.antlrtree.txt | 164 + ...inProjectedDnnParameter.test.antlrtree.txt | 485 ++ .../kt46186.reversed.antlrtree.txt | 2631 ++++++++ ...t46186withEmptyIntersections.antlrtree.txt | 2633 ++++++++ ...typeParameterChainInReceiver.antlrtree.txt | 60 + ...peParameterChainInReturnType.antlrtree.txt | 58 + ...omTypeAliasObject.reversed.1.antlrtree.txt | 57 + ...omTypeAliasObject.reversed.2.antlrtree.txt | 61 + ...romJavaViaAlias.reversed.foo.antlrtree.txt | 38 + ...omJavaViaAlias.reversed.test.antlrtree.txt | 100 + .../typealias/kt57065.antlrtree.txt | 133 + .../privateInFile.ll.file1.antlrtree.txt | 209 + .../privateInFile.ll.file2.antlrtree.txt | 196 + ...portOnTypeAlias.reversed.bar.antlrtree.txt | 117 + ...portOnTypeAlias.reversed.foo.antlrtree.txt | 99 + .../unexpectedSafeCall.antlrtree.txt | 108 + ...rCoercionNamedArg.annotation.antlrtree.txt | 27 + ...IntegerCoercionNamedArg.test.antlrtree.txt | 228 + ...ercionOverloading.annotation.antlrtree.txt | 27 + ...egerCoercionOverloading.test.antlrtree.txt | 634 ++ ...leOnRegularDelegatedProperty.antlrtree.txt | 355 + .../valueClasses/annotations.antlrtree.txt | 3031 +++++++++ .../defaultParameters.antlrtree.txt | 192 + ...icientEqualsOverridingInMfvc.antlrtree.txt | 527 ++ .../inlineKeywordForMfvc.antlrtree.txt | 478 ++ ...mbersAndConstructsInsideMfvc.antlrtree.txt | 2603 ++++++++ ...EqualsOperatorModifierInMfvc.antlrtree.txt | 326 + ...nericUnderlyingTypeNoFeature.antlrtree.txt | 231 + ...rfaceFieldDirectAccess.Child.antlrtree.txt | 99 + .../visibility/kt56283.antlrtree.txt | 454 ++ .../moreSpecificProtected.antlrtree.txt | 3036 +++++++++ .../moreSpecificProtectedSimple.antlrtree.txt | 1010 +++ .../notOverridingInternal.Base.antlrtree.txt | 87 + .../notOverridingInternal.Impl.antlrtree.txt | 153 + ...verridingPackagePrivate.Impl.antlrtree.txt | 153 + .../packagePrivateStatic.main.antlrtree.txt | 167 + ...kagePrivateStatic.withImport.antlrtree.txt | 61 + ...aceFieldViaKotlinClass.Child.antlrtree.txt | 162 + ...avapackage_KotlinParentClass.antlrtree.txt | 28 + ...eStaticInterfaceMethod.Child.antlrtree.txt | 161 + ...ivateStaticViaInternal.Child.antlrtree.txt | 87 + ...avapackage_KotlinParentClass.antlrtree.txt | 39 + ...rivateStaticViaTypeAlias.foo.antlrtree.txt | 181 + ...tCastAndSuppressedVisibility.antlrtree.txt | 323 + ...ationForValueParameters.main.antlrtree.txt | 713 ++ .../noWarningAfterSmartcast.antlrtree.txt | 245 + .../noWarningOnSAMAdaption.main.antlrtree.txt | 141 + .../TypeParameterError.test.antlrtree.txt | 724 ++ .../TypeParameterWarning.test.antlrtree.txt | 725 ++ .../flexibleEnumInSubject.main.antlrtree.txt | 711 ++ ...onExhaustiveDependentContext.antlrtree.txt | 315 + ...nOverEnumWithSameNameAsEntry.antlrtree.txt | 207 + .../whileConditionExpectedType.antlrtree.txt | 266 + 572 files changed, 229501 insertions(+) create mode 100644 grammar/testData/diagnostics/FreeFunctionCalledAsExtension.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/abstractClassReference.antlrtree.txt create mode 100644 grammar/testData/diagnostics/ambiguityNamedVararg.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotationArgumentWithAliasedArrayType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/AnnotatedNullableTypes.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/InheritingAnnotationClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/annotationsOnDataClassCopy.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/javaAnnotationAndJavaClassWithIt.foo_AnotherTarget.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/options/javaKotlinTargetRetentionWithExplicitImport.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/rendering/typeMismatchOnOverrideJavaNullable.ll.k.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/repeatable/javaRepeatableInKotlin.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOff.antlrtree.txt create mode 100644 grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOff.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitErrorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitSecondaryConstructorErrorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitTwoSecondaryConstructorsErrorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/ValWithSetterDeferredInit.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/implicitPrimaryConstructor_errorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInSecondary_errorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInTwoSecondaries_errorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedWarning.antlrtree.txt create mode 100644 grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/onePrimary_oneSecondary_errorAnyway.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/adapted/adaptationByExpectTypeOutsideCall.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/adapted/adaptationInWhenWithMapOf.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/adapted/adaptationToOverridenWithoutDefault.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/adapted/noKFunctionForAdaptation.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/adapted/simpleAdaptationOutsideOfCall.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/callableReferencesToCompanionMembers.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/deprecateTopLevelReferenceWithCompanionLHS.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/generic/boundViolated.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/generic/incorrectNumberOfTypeArguments.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/genericTypealiasInLhs.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/property/mutablePropertyViaDelegation.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/referenceInCycleInProperties.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/resolve/onlyInputTypesOnCallableReference.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/unsupported/classLiteralsWithEmptyLHS.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/unsupported/javaOverridesKotlinProperty.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/callableReference/unsupported/syntheticPropertiesOnJavaAnnotation.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/cast/AsInCompoundAssignment.antlrtree.txt create mode 100644 grammar/testData/diagnostics/checkArguments/kt51062Error.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/checkTypeWithExactTest.antlrtree.txt create mode 100644 grammar/testData/diagnostics/classLiteral/parameterizedTypeAlias.antlrtree.txt create mode 100644 grammar/testData/diagnostics/comparingArbitraryClasses.antlrtree.txt create mode 100644 grammar/testData/diagnostics/comparingCallableReferencesWithInstanceOfJavaClass.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/comparisonOfGenericInterfaceWithGenericClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/constructorConsistency/errorInsideDelegationCallNoPrimary.antlrtree.txt create mode 100644 grammar/testData/diagnostics/constructorConsistency/parametersVsPropertiesFromPrimaryConstructor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/constructorConsistency/twoSuperTypeCalls.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_function.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_property.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.KotlinBase.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/deadCode/initializationInUnreachableCode.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/deadCode/reassignementInUnreachableCode.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/returnAliasedUnitNotRequired.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/singleReturnFromTry.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/delegatedConstructorArguments.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/delegatedMemberProperyWriteInInit.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/inlinedBreakContinueFeatureDisabled.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/reassignmentInCatch.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/safeCallAfterVariableInitialization.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/smartCastInCatch.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlFlowAnalysis/uninintializedProperyWithDirectAndDelayedInitialization.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlStructures/continueInInitBlock.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlStructures/forWithIncorrectTypeSpecializer.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlStructures/incorrectElvis.antlrtree.txt create mode 100644 grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt create mode 100644 grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.I.antlrtree.txt create mode 100644 grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.K.antlrtree.txt create mode 100644 grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.ExceptionTracker.antlrtree.txt create mode 100644 grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.StorageManager.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/decoratedLambda.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/elvisInDelegated.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/ifInDelegated.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/kt41952.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCalls.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCallsSimple.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/notNullAssertionInLocalDelegated.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/inference/tryInGenerated.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/noInferenceFromGetValueThroughSetValue.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/noInferenceFromWrappedDelegate.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/noPreliminarySetterInferenceForImplicitlyTypedVar.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/provideDelegate/notNullAssertionInLocalDelegated.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/provideDelegate/onObject.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegatedProperty/recursiveType.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegation/kt49477.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegation/kt49477Error.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/delegationTypeMismatch.antlrtree.txt create mode 100644 grammar/testData/diagnostics/deprecated/deprecatedCompanionAndClassReference.antlrtree.txt create mode 100644 grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.use.antlrtree.txt create mode 100644 grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.use.antlrtree.txt create mode 100644 grammar/testData/diagnostics/deprecated/deprecatedField.use.antlrtree.txt create mode 100644 grammar/testData/diagnostics/derivedIntersectionPropertyShadowsBaseClassField.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/differentNumericTypesFromSmartCast.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReference.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferenceOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferencePrioritized.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClash.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashPrioritized.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClash.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashPrioritized.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClash.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClashOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClash.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashPrioritized.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/entriesUnsupported.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/enumEntriesAmbiguity.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClash.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClashOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguity.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguityOn.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/javaFakeEnumEntries.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntries.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesPrioritized.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsic.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsicOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/equalityOfEnumAndParameter.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/equalityOfFlexibleTypeParameters.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/enum/referenceToEnumEntry.antlrtree.txt create mode 100644 grammar/testData/diagnostics/equalityComparisonToSelf.antlrtree.txt create mode 100644 grammar/testData/diagnostics/equalityWithSmartCastInIfBlock.antlrtree.txt create mode 100644 grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt create mode 100644 grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField13.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType2.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Base.antlrtree.txt create mode 100644 grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Derived.antlrtree.txt create mode 100644 grammar/testData/diagnostics/finalSupertype.antlrtree.txt create mode 100644 grammar/testData/diagnostics/funReturnsAny.antlrtree.txt create mode 100644 grammar/testData/diagnostics/functionLiterals/kt56138.antlrtree.txt create mode 100644 grammar/testData/diagnostics/generics/approximationOfInProjection.antlrtree.txt create mode 100644 grammar/testData/diagnostics/generics/nullableTypeParameterScope.antlrtree.txt create mode 100644 grammar/testData/diagnostics/generics/outerTypeParametersInNestedClasses.antlrtree.txt create mode 100644 grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentNameComplex.antlrtree.txt create mode 100644 grammar/testData/diagnostics/imports/brokenImport.Klass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/imports/brokenImport.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/imports/renamedImportInDifferentFile.first.antlrtree.txt create mode 100644 grammar/testData/diagnostics/imports/renamedImportInDifferentFile.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt create mode 100644 grammar/testData/diagnostics/incrementDecrementOnFullyQualified.antlrtree.txt create mode 100644 grammar/testData/diagnostics/incrementDecrementOnObject.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/builderInference/incompleteCallInReturnArgumentsWithProperExpectType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/callableReferences/conversionLastStatementInLambda.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/callableReferences/kt55931.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/callableReferences/kt56227.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/capturedTypes/approximationLeavesNonTrivialLowerBound.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScope.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScopeAny.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/capturedTypes/differentCapturedTypes.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/coercionToUnit/afterBareReturn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/coercionToUnit/nestedLambda.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/elvisInsideWhen.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/emptyIntersectionTypes/emptyIntersectionOnIf.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt54411.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/exclExclInference.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/forks/nestedCallVariableFixation.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/forks/nestedCallVariableFixationSimple.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/forks/overloadResolutionByLambdaReturnTypeAndExpectedType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/genericCallInThrow.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/ifWithDependentBranches.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/inferenceForkRegression.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/inferenceForkRegressionSimple.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/nothingType/kt56448.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/nothingType/returnAsLastStatementInLambda.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/nothingType/selectWithNull.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/nothingVsParameterBound.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/nullableArgumentForDnn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/receiverTypeMismatch_withProper.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/receiverTypeMismatch_withoutProper.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/recursiveCalls/kt23531.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/smartCastForkForExpectType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inference/smartCastForkForExpectedTypeNested.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inline/nonPublicMember/kt55179.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inline/nonPublicMember/protectedInlineInsideInternal.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inline/recursiveTypeInPrivateInlineFunction.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inline/returnedAnonymousObjects_2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inline/valueClasses.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inline/virtualValInEnum.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineClasses/inefficientEqualsOverridingInInlineClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOff.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOn.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineClasses/reservedConstructorsBodyInKotlinPre19.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorDeclarationCheck.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorModifierInInlineClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inlineDeprecationsOnImplicitCalls.antlrtree.txt create mode 100644 grammar/testData/diagnostics/inner/nestedClassTypeParameterNameCollision.antlrtree.txt create mode 100644 grammar/testData/diagnostics/integerLiterals/complexMapping.complexMapping.antlrtree.txt create mode 100644 grammar/testData/diagnostics/integerLiterals/literalInCompletedGeneric.antlrtree.txt create mode 100644 grammar/testData/diagnostics/integerLiterals/sortedBy.antlrtree.txt create mode 100644 grammar/testData/diagnostics/integerLiterals/vararg.antlrtree.txt create mode 100644 grammar/testData/diagnostics/invisibleClassInsteadOfFun.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/invisibleClassInsteadOfFun.pagind_QueryPagingSource.antlrtree.txt create mode 100644 grammar/testData/diagnostics/invisibleMemberDestructuring.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/collectionOverrides/nonDirectHiddenOverride.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/javaLangStringCtr.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/kt60580.usage.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/ktij24272.use.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/nullForOptionalOf.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.KIntermediateClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/propagateFlexibleTypeToAnonymousFunction.usage.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/properties/unitVsVoid.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/rawTypesFromCaptured.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/rawTypesFromCapturedOriginal.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/specialBuiltIns/inheritanceThroughEmptyClass.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/staticImportViaInheritance.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationCaptureObject.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationInstanceObject.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticPropertyOverridden.KtCodeFragment.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.DeserializedClassDescriptor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.Modality.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.DeserializedClassDescriptor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.Modality.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt46483.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt53988.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt54587_1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt54587_2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt55181.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt55666.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt55733.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt56612.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt56665.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt56723.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt56769.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt56876.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt56877.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt57085.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt57175.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt57214.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt57214.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt58583.DialogWrapper.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt58583.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/kt60638.antlrtree.txt create mode 100644 grammar/testData/diagnostics/labels/labelToOuterLambda.antlrtree.txt create mode 100644 grammar/testData/diagnostics/missingIteratorMissing.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/enumConstName_after.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/enumConstName_before.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/enumJavaName_after.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/equals_after.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/equals_before.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/ifConstVal_after.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/ifConstVal_before.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/kCallable_after.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/kCallable_before.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/stringConcatenation.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/const/stringConcatenationWithObject.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/protectedInExpectActual.antlrtree.txt create mode 100644 grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/dependsOnModule.a.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/dependsOnModule.b.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/dependsOnModule.c.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/friendModule.a.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/friendModule.b.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/friendModulePrivate.a.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multimodule/friendModulePrivate.b.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/checkNoActualForExpectInLastModule.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectAbstractToString.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectAbstractToString.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectExternal.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectExternal.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectTailrec.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/expectTailrec.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/intermediateActualHasAdditionalSupertypes.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/kt-55570.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringDemoInterface.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringValue.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/kt57320.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModule.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModuleIncompatibilities.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/incDecOperatorsInExpectClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationAllowed.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationDisallowed.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/kt54827.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/kt54827.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/kt58153.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/kt58153.platform.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.platform.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/supertypeActualizationWithAny.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/varSetterVisibility.common.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/varSetterVisibility.jvm.antlrtree.txt create mode 100644 grammar/testData/diagnostics/multiplatform/widerVisibilityInActualClassifier.antlrtree.txt create mode 100644 grammar/testData/diagnostics/namedArguments/disallowForDelegationToJavaMethods.1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/namedArguments/disallowForFunctionTypes.antlrtree.txt create mode 100644 grammar/testData/diagnostics/noLibraryProvidersDuplication.antlrtree.txt create mode 100644 grammar/testData/diagnostics/noLibraryProvidersDuplicationWithMpp.antlrtree.txt create mode 100644 grammar/testData/diagnostics/noSymbolProvidersDuplicationInDiamond.antlrtree.txt create mode 100644 grammar/testData/diagnostics/noUnusedOnDelegationWithProvider.antlrtree.txt create mode 100644 grammar/testData/diagnostics/nullableTypes/kt58844.antlrtree.txt create mode 100644 grammar/testData/diagnostics/nullableTypes/notUselessComparasionAfterSmartcast.antlrtree.txt create mode 100644 grammar/testData/diagnostics/numbers/integerLiteralWillChangeResolveInFunctionReturnPosition.antlrtree.txt create mode 100644 grammar/testData/diagnostics/numbers/kt45970.antlrtree.txt create mode 100644 grammar/testData/diagnostics/numbers/kt48361.antlrtree.txt create mode 100644 grammar/testData/diagnostics/operatorsOverloading/EqualsOperatorOverrideHierarchies.antlrtree.txt create mode 100644 grammar/testData/diagnostics/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/overload/doubleWinsOverFloat.antlrtree.txt create mode 100644 grammar/testData/diagnostics/overload/lambdasWithDifferentParameterNumber.antlrtree.txt create mode 100644 grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClassWithReturnType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/InheritingJavaClassWithRawTypeInOverrideSignature.Main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/InternalPotentialOverride.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/InternalPotentialOverride.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/clashesOnInheritance/conflictingInherited.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/derivedClasses/Constructor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/derivedClasses/DelegatedConstructor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/derivedClasses/EnumValues.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/derivedClasses/Instance.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/derivedClasses/StaticFieldFromJava.k.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/derivedClasses/StaticMethodFromJava.k.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/diamondWithDiagonal.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/kt53408.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.CK.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.C.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/varImplementedByInheritedVal.antlrtree.txt create mode 100644 grammar/testData/diagnostics/override/varImplementedByInheritedValError.antlrtree.txt create mode 100644 grammar/testData/diagnostics/overrideNotNull_Fail.antlrtree.txt create mode 100644 grammar/testData/diagnostics/overrideNotNull_Ok.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/javaMappedCtors.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/notNullTypeParameter/supplier.KotlinMain.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.Foo.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/lostRawTypeAfterElvis.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/noTypeArgumentsForRawScopedMembers.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.reversed.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/nonRawArraysInRawType.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeSyntheticExtensions.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/platformTypes/rawTypes/smartCastToClassWithRawSupertype.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/prefixIncReturnType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/prefixIncSmartCast.antlrtree.txt create mode 100644 grammar/testData/diagnostics/properties/constAnnotationCycle.antlrtree.txt create mode 100644 grammar/testData/diagnostics/properties/inferPropertyTypeFromGetter.antlrtree.txt create mode 100644 grammar/testData/diagnostics/properties/kt56707.antlrtree.txt create mode 100644 grammar/testData/diagnostics/properties/localPropertyExtensions.antlrtree.txt create mode 100644 grammar/testData/diagnostics/rawCastToStarProjection_Fail.antlrtree.txt create mode 100644 grammar/testData/diagnostics/rawCastToStarProjection_Ok.antlrtree.txt create mode 100644 grammar/testData/diagnostics/rawTypes/kt57620.ProjectMain.antlrtree.txt create mode 100644 grammar/testData/diagnostics/receiverResolutionInDelegatedConstructor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/redeclarations/RedeclaredValsAndVars.antlrtree.txt create mode 100644 grammar/testData/diagnostics/referenceToParameterizedFun.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.pkg.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/companionPropertyAndTypeParameter.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/errorPriority.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/avoidTypeCheckerRecursion.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/closeInvokesFarVariable.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/closerVariableMatterMore.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/completePropertyBeforeInvoke.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/implicitAndInvokeExtensionPriority.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/implicitPropertyType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/kt51793.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/invoke/kt51793Complex.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/overloadConflicts/filteringOutOverrides.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/overloadConflicts/kt55722.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/overloadConflicts/kt55722Initial.antlrtree.txt create mode 100644 grammar/testData/diagnostics/resolve/priority/extensionVsMember.antlrtree.txt create mode 100644 grammar/testData/diagnostics/safeCalls/safeCallOnFlexibleTypeAlias.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/samConversions/samConversionWithCondition.antlrtree.txt create mode 100644 grammar/testData/diagnostics/samConversions/samConversionWithConditionJava.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/samConversions/samConversionWithSafeCallAndInference.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.base.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.base.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/variantProjections/dataClassCopy.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/variantProjections/interdependentStarProjections.antlrtree.txt create mode 100644 grammar/testData/diagnostics/scopes/variantProjections/unsafeVarianceAndCovariantProjection.antlrtree.txt create mode 100644 grammar/testData/diagnostics/senselessComparison/complexExpression.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/implicitThisOrLocalVar.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/intersectionScope/capturedSpecificity.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/intersectionScope/intersectReturnType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/kt45814.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/publicVals/accessThrowOtherModule.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.A.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.B.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/smartcastInFriendModule.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/smartcastToStarProjection.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/capturedLoopVariable.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/capturedWithControlJumps.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/localDelegatedProperty.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/objectMembers.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/reassignedDependency.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/reassignedDependency_unstable.antlrtree.txt create mode 100644 grammar/testData/diagnostics/smartCasts/variables/reassignedInRhs.antlrtree.txt create mode 100644 grammar/testData/diagnostics/subtyping/delegatedConstructor.bar.antlrtree.txt create mode 100644 grammar/testData/diagnostics/subtyping/delegatedConstructor.foo.antlrtree.txt create mode 100644 grammar/testData/diagnostics/subtyping/delegatedConstructor.lib.antlrtree.txt create mode 100644 grammar/testData/diagnostics/subtyping/kFunctionalCST.antlrtree.txt create mode 100644 grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperTypeRestrictionLifted.antlrtree.txt create mode 100644 grammar/testData/diagnostics/suppressExposedPropertyTypeInConstructor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/suppressExposedPropertyTypeInPrivateConstructor.antlrtree.txt create mode 100644 grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt create mode 100644 grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt create mode 100644 grammar/testData/diagnostics/suspendConversion/suspendFunctionExpectedTypeAndWhen.antlrtree.txt create mode 100644 grammar/testData/diagnostics/syntheticExtensions/javaProperties/FullySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt create mode 100644 grammar/testData/diagnostics/syntheticExtensions/javaProperties/OverrideOnlyGetterFromGenericJavaClass.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/syntheticSet.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/syntheticSetFalsePositive.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithExplicitApi/kt56505.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithJava17/jvmRecord/explicitSuperConstructorCall.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithExplicitComponent.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithGeneric.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsDefaultConstructor.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsWithSecondaryConstructor.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/testsWithJava17/sealedClasses/flexibleSealedInSubject.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/thisAndSuper/considerAnonymousObjectsForSuperclassNotAccessibleFromInterface.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typeParameters/inProjectedDnnParameter.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typeParameters/kt46186.reversed.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typeParameters/kt46186withEmptyIntersections.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typeParameters/typeParameterChainInReceiver.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typeParameters/typeParameterChainInReturnType.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.foo.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/kt57065.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/privateInFile.ll.file1.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/privateInFile.ll.file2.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.bar.antlrtree.txt create mode 100644 grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.foo.antlrtree.txt create mode 100644 grammar/testData/diagnostics/unexpectedSafeCall.antlrtree.txt create mode 100644 grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.annotation.antlrtree.txt create mode 100644 grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.annotation.antlrtree.txt create mode 100644 grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/unusedVariableOnRegularDelegatedProperty.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/annotations.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/defaultParameters.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/inefficientEqualsOverridingInMfvc.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/inlineKeywordForMfvc.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideMfvc.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/typedEqualsOperatorModifierInMfvc.antlrtree.txt create mode 100644 grammar/testData/diagnostics/valueClasses/valueClassWithGenericUnderlyingTypeNoFeature.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/javaInterfaceFieldDirectAccess.Child.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/kt56283.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/moreSpecificProtected.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/moreSpecificProtectedSimple.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/notOverridingInternal.Base.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/notOverridingInternal.Impl.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/notOverridingPackagePrivate.Impl.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStatic.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStatic.withImport.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.Child.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.javapackage_KotlinParentClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceMethod.Child.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.Child.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.javapackage_KotlinParentClass.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/packagePrivateStaticViaTypeAlias.foo.antlrtree.txt create mode 100644 grammar/testData/diagnostics/visibility/smartCastAndSuppressedVisibility.antlrtree.txt create mode 100644 grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/incorrectCapturedApproximationForValueParameters.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningAfterSmartcast.antlrtree.txt create mode 100644 grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningOnSAMAdaption.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/when/TypeParameterError.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/when/TypeParameterWarning.test.antlrtree.txt create mode 100644 grammar/testData/diagnostics/when/flexibleEnumInSubject.main.antlrtree.txt create mode 100644 grammar/testData/diagnostics/when/nonExhaustiveDependentContext.antlrtree.txt create mode 100644 grammar/testData/diagnostics/when/whenOverEnumWithSameNameAsEntry.antlrtree.txt create mode 100644 grammar/testData/diagnostics/whileConditionExpectedType.antlrtree.txt diff --git a/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.reversed.antlrtree.txt b/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.reversed.antlrtree.txt new file mode 100644 index 000000000..eabd268e4 --- /dev/null +++ b/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.reversed.antlrtree.txt @@ -0,0 +1,204 @@ +File: FreeFunctionCalledAsExtension.reversed.kt - b22c92c2d9fbd292bc12c2de13f10269 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AliasedEFT") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ExtensionFunctionType") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("AliasedEFT") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/abstractClassReference.antlrtree.txt b/grammar/testData/diagnostics/abstractClassReference.antlrtree.txt new file mode 100644 index 000000000..eba6e2071 --- /dev/null +++ b/grammar/testData/diagnostics/abstractClassReference.antlrtree.txt @@ -0,0 +1,124 @@ +File: abstractClassReference.kt - 90b0f6d0566f73c2625b5554932d85bb + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("AbstractClass") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("abstractClass") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("AbstractClass") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("abstractClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/ambiguityNamedVararg.antlrtree.txt b/grammar/testData/diagnostics/ambiguityNamedVararg.antlrtree.txt new file mode 100644 index 000000000..80ca986de --- /dev/null +++ b/grammar/testData/diagnostics/ambiguityNamedVararg.antlrtree.txt @@ -0,0 +1,384 @@ +File: ambiguityNamedVararg.kt - 20033c5afb70edb51607498caeee8f5e + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("swapVararg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("namedVararg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("named") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("swapVararg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("named") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("namedVararg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("swapVararg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("named") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("namedVararg") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("swap") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("string") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("int") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("swap") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("int") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("string") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("swap") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("string") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotationArgumentWithAliasedArrayType.antlrtree.txt b/grammar/testData/diagnostics/annotationArgumentWithAliasedArrayType.antlrtree.txt new file mode 100644 index 000000000..1b966dc2f --- /dev/null +++ b/grammar/testData/diagnostics/annotationArgumentWithAliasedArrayType.antlrtree.txt @@ -0,0 +1,53 @@ +File: annotationArgumentWithAliasedArrayType.kt - 15a1dff7f46c7acd43a945e4790cc7dd + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Aliased") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Tag") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + parameterModifier + VARARG("vararg") + VAL("val") + simpleIdentifier + Identifier("tags") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Aliased") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/AnnotatedNullableTypes.antlrtree.txt b/grammar/testData/diagnostics/annotations/AnnotatedNullableTypes.antlrtree.txt new file mode 100644 index 000000000..bd61a62d9 --- /dev/null +++ b/grammar/testData/diagnostics/annotations/AnnotatedNullableTypes.antlrtree.txt @@ -0,0 +1,272 @@ +File: AnnotatedNullableTypes.kt - e90fcfa239f1d5fa8075e1bba502ed17 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPE") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("TypeAnn") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("TypeAnn") + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("TypeAnn") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/InheritingAnnotationClass.antlrtree.txt b/grammar/testData/diagnostics/annotations/InheritingAnnotationClass.antlrtree.txt new file mode 100644 index 000000000..847cbc76e --- /dev/null +++ b/grammar/testData/diagnostics/annotations/InheritingAnnotationClass.antlrtree.txt @@ -0,0 +1,33 @@ +File: InheritingAnnotationClass.kt - 7219c20efd0ad09e232add96375816a0 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("AnnKlass") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("AnnKlass") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.reversed.antlrtree.txt b/grammar/testData/diagnostics/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.reversed.antlrtree.txt new file mode 100644 index 000000000..3eb601d88 --- /dev/null +++ b/grammar/testData/diagnostics/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.reversed.antlrtree.txt @@ -0,0 +1,164 @@ +File: MutuallyRecursivelyAnnotatedGlobalFunction.reversed.kt - 2aef41bb726038411fab5712042a8b72 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ann") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/annotationsOnDataClassCopy.antlrtree.txt b/grammar/testData/diagnostics/annotations/annotationsOnDataClassCopy.antlrtree.txt new file mode 100644 index 000000000..b6b88cc11 --- /dev/null +++ b/grammar/testData/diagnostics/annotations/annotationsOnDataClassCopy.antlrtree.txt @@ -0,0 +1,325 @@ +File: annotationsOnDataClassCopy.kt - 497b4da7f677cbfab152010a4c309607 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("NoTarget") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("VALUE_PARAMETER") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Param") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Prop") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("VALUE_PARAMETER") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Both") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("NoTarget") + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Param") + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Prop") + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Both") + VAL("val") + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("NoTarget") + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Both") + VAL("val") + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("NoTarget") + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Both") + VAL("val") + simpleIdentifier + Identifier("p3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + COMMA(",") + RPAREN(")") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/javaAnnotationAndJavaClassWithIt.foo_AnotherTarget.antlrtree.txt b/grammar/testData/diagnostics/annotations/javaAnnotationAndJavaClassWithIt.foo_AnotherTarget.antlrtree.txt new file mode 100644 index 000000000..adb883aa6 --- /dev/null +++ b/grammar/testData/diagnostics/annotations/javaAnnotationAndJavaClassWithIt.foo_AnotherTarget.antlrtree.txt @@ -0,0 +1,49 @@ +File: javaAnnotationAndJavaClassWithIt.foo_AnotherTarget.kt - 0dc112d7cc06b798746d148a1f4ae69c + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("foo") + semi + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + CLASS("class") + simpleIdentifier + Identifier("AnotherTarget") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("hello") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/options/javaKotlinTargetRetentionWithExplicitImport.antlrtree.txt b/grammar/testData/diagnostics/annotations/options/javaKotlinTargetRetentionWithExplicitImport.antlrtree.txt new file mode 100644 index 000000000..95317bf6f --- /dev/null +++ b/grammar/testData/diagnostics/annotations/options/javaKotlinTargetRetentionWithExplicitImport.antlrtree.txt @@ -0,0 +1,84 @@ +File: javaKotlinTargetRetentionWithExplicitImport.kt - 1e88b8a0f2629de0403bd71ebe6c515f + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("lang") + DOT(".") + simpleIdentifier + ANNOTATION("annotation") + DOT(".") + simpleIdentifier + Identifier("Target") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("lang") + DOT(".") + simpleIdentifier + ANNOTATION("annotation") + DOT(".") + simpleIdentifier + Identifier("ElementType") + DOT(".") + simpleIdentifier + Identifier("PACKAGE") + semi + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PACKAGE") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("my") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/rendering/typeMismatchOnOverrideJavaNullable.ll.k.antlrtree.txt b/grammar/testData/diagnostics/annotations/rendering/typeMismatchOnOverrideJavaNullable.ll.k.antlrtree.txt new file mode 100644 index 000000000..1997f499a --- /dev/null +++ b/grammar/testData/diagnostics/annotations/rendering/typeMismatchOnOverrideJavaNullable.ll.k.antlrtree.txt @@ -0,0 +1,372 @@ +File: typeMismatchOnOverrideJavaNullable.ll.k.kt - de8bf95ad64b58548779d8882de699c8 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("org") + DOT(".") + simpleIdentifier + Identifier("jetbrains") + DOT(".") + simpleIdentifier + Identifier("annotations") + DOT(".") + simpleIdentifier + Identifier("NotNull") + semi + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPE") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("VALUE_PARAMETER") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("An") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("An") + NL("\n") + modifier + visibilityModifier + PUBLIC("public") + INTERFACE("interface") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("NotNull") + NL("\n") + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("An") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("D") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/repeatable/javaRepeatableInKotlin.antlrtree.txt b/grammar/testData/diagnostics/annotations/repeatable/javaRepeatableInKotlin.antlrtree.txt new file mode 100644 index 000000000..abda0ab7c --- /dev/null +++ b/grammar/testData/diagnostics/annotations/repeatable/javaRepeatableInKotlin.antlrtree.txt @@ -0,0 +1,116 @@ +File: javaRepeatableInKotlin.kt - a771ed2836601805ce212cbb26844a6c + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Rep") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("java") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("lang") + DOT(".") + simpleUserType + simpleIdentifier + ANNOTATION("annotation") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Repeatable") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Rep") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("RepeatableAnnotationContainer") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("RepeatableAnnotation") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("RepeatableAnnotationContainer") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RepeatableAnnotation") + CLASS("class") + simpleIdentifier + Identifier("Annotated") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOff.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOff.antlrtree.txt new file mode 100644 index 000000000..a6a988391 --- /dev/null +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOff.antlrtree.txt @@ -0,0 +1,345 @@ +File: prohibitUseSiteGetTargetAnnotationsOff.kt - 8dc297388b201d7ae5260eecc76c3cf8 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + SET("set") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("mutableProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + NL("\n") + setter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + SET("set") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + SET("set") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + SET("set") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("mutableProperty_AnnWithoutTarget") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + NL("\n") + setter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + SET("set") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("immutableProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("immutableProperty_AnnWithoutTarget") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOn.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOn.antlrtree.txt new file mode 100644 index 000000000..0f3261315 --- /dev/null +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/prohibitUseSiteGetTargetAnnotationsOn.antlrtree.txt @@ -0,0 +1,345 @@ +File: prohibitUseSiteGetTargetAnnotationsOn.kt - 631f596ee4a028a4e1582fcda9990511 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + SET("set") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("mutableProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + NL("\n") + setter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + SET("set") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + SET("set") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + SET("set") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("mutableProperty_AnnWithoutTarget") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + NL("\n") + setter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + SET("set") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("immutableProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS("\n@") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("immutableProperty_AnnWithoutTarget") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + getter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOff.antlrtree.txt b/grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOff.antlrtree.txt new file mode 100644 index 000000000..fb9ae7366 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOff.antlrtree.txt @@ -0,0 +1,147 @@ +File: MustBeInitializedEffectivelyFinalOff.kt - d7b47e9ad7995416f41d1f1305515904 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOn.antlrtree.txt b/grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOn.antlrtree.txt new file mode 100644 index 000000000..2c267de6c --- /dev/null +++ b/grammar/testData/diagnostics/backingField/MustBeInitializedEffectivelyFinalOn.antlrtree.txt @@ -0,0 +1,147 @@ +File: MustBeInitializedEffectivelyFinalOn.kt - afcd6dc6e2de4cd2236fbd28d6916efb + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitErrorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitErrorAnyway.antlrtree.txt new file mode 100644 index 000000000..6cee84c99 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitErrorAnyway.antlrtree.txt @@ -0,0 +1,143 @@ +File: OpenValPartialDeferredInitErrorAnyway.kt - 28b6c2a55c7d02e19b6ce660ca6da538 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitSecondaryConstructorErrorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitSecondaryConstructorErrorAnyway.antlrtree.txt new file mode 100644 index 000000000..a027177b5 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitSecondaryConstructorErrorAnyway.antlrtree.txt @@ -0,0 +1,146 @@ +File: OpenValPartialDeferredInitSecondaryConstructorErrorAnyway.kt - 4edf5c72b1d79e3d547191242b98801d + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitTwoSecondaryConstructorsErrorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitTwoSecondaryConstructorsErrorAnyway.antlrtree.txt new file mode 100644 index 000000000..82b795c28 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/OpenValPartialDeferredInitTwoSecondaryConstructorsErrorAnyway.antlrtree.txt @@ -0,0 +1,106 @@ +File: OpenValPartialDeferredInitTwoSecondaryConstructorsErrorAnyway.kt - a19b8dec73e763c23d5285b0d196910c + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt new file mode 100644 index 000000000..d2f6503b9 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt @@ -0,0 +1,1364 @@ +File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt new file mode 100644 index 000000000..aab81d064 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt @@ -0,0 +1,1165 @@ +File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef8875921f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt new file mode 100644 index 000000000..2bf765873 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt @@ -0,0 +1,1165 @@ +File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66cb9d + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("final_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_notInitializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("open_initializedInPlace3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("final_notInitializedInPlace_deferredInit3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredInit0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("open_notInitializedInPlace_deferredinit3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/ValWithSetterDeferredInit.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValWithSetterDeferredInit.antlrtree.txt new file mode 100644 index 000000000..a188b60de --- /dev/null +++ b/grammar/testData/diagnostics/backingField/ValWithSetterDeferredInit.antlrtree.txt @@ -0,0 +1,95 @@ +File: ValWithSetterDeferredInit.kt - 18a8ca672d9dc1f28c6fd6ca2dbbc1e5 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt b/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt new file mode 100644 index 000000000..c4dd8bc40 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt @@ -0,0 +1,5163 @@ +File: VarDeferredInitInFinalClass.kt - 785ac3ec41629d327f140246e4a43324 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + NL("\n") + INIT("init") + LCURL("{") + NL("\n") + Identifier("a00") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a01") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a02") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a03") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a10") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a11") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a12") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a13") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a20") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a21") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a22") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a23") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a30") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a31") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a32") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a33") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + NL("\n") + Identifier("b00") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b01") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b02") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b03") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b10") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b11") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b12") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b13") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b20") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b21") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b22") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b23") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b30") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b31") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b32") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b33") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt b/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt new file mode 100644 index 000000000..7722ce41b --- /dev/null +++ b/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt @@ -0,0 +1,4423 @@ +File: VarDeferredInitInOpenClass.kt - 5de6fdada1ebc05e76cd774159cf0e38 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + FIELD("field") + SEMICOLON(";") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + SEMICOLON(";") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + GET("get") + LPAREN("(") + RPAREN(")") + ASSIGNMENT("=") + IntegerLiteral("1") + SEMICOLON(";") + NL("\n") + NL("\n") + INIT("init") + LCURL("{") + NL("\n") + Identifier("a00") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a01") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a02") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a03") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a10") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a11") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a12") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a13") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a20") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a21") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a22") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a23") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a30") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a31") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a32") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("a33") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + NL("\n") + Identifier("b00") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b01") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b02") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b03") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b10") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b11") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b12") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b13") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b20") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b21") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b22") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b23") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b30") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b31") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b32") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + Identifier("b33") + ASSIGNMENT("=") + IntegerLiteral("1") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/implicitPrimaryConstructor_errorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/implicitPrimaryConstructor_errorAnyway.antlrtree.txt new file mode 100644 index 000000000..3ad98c906 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/implicitPrimaryConstructor_errorAnyway.antlrtree.txt @@ -0,0 +1,89 @@ +File: implicitPrimaryConstructor_errorAnyway.kt - e118ea9ea659a38bc41a7edaecbd20ce + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..84f649d1e --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,155 @@ +File: noPrimary_oneInheritedSecondary_mustBeInitializedError.kt - 2fd43187a00a30cff926f8fe55c1583b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..47748c9a1 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneInheritedSecondary_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,155 @@ +File: noPrimary_oneInheritedSecondary_mustBeInitializedWarning.kt - da386623c1ed3a68527a7d128c00a926 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..a9b80b5c6 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedError.kt - 9eeba556e96fc7fbad57f2fae1932711 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..c0f17ebfd --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_deferredInitInSecondary_mustBeInitializedWarning.kt - ab27231f5e2bd90da6a5dcd320e617eb + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..3d3bc4610 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,96 @@ +File: noPrimary_oneSecondary_mustBeInitializedError.kt - 622bf6c416e92bf24633257706f2f00f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..04d8c76c0 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,96 @@ +File: noPrimary_oneSecondary_mustBeInitializedWarning.kt - 1d5f944448ee0d5bafdbacd2c804a37d + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..c3f15a3a3 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_openValError_mustBeInitializedError.kt - 6ffd7912868edd72e765e7de60bb53ca + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..1e067b92f --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValError_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_openValError_mustBeInitializedWarning.kt - f0e4a703e78215ebe8fcc33dcdcec773 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..3bbce6450 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_openValWarning_mustBeInitializedError.kt - 44c9a456cfc5dc6542b8a5f2d96b89e1 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..9d98ac22c --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openValWarning_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_openValWarning_mustBeInitializedWarning.kt - 32611ed96073cb52993b74101693b111 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..2ca4e2a15 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_openVar_mustBeInitializedError.kt - 50a7682c305e504293624bc6a184dc5c + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..03adef26c --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_oneSecondary_openVar_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,90 @@ +File: noPrimary_oneSecondary_openVar_mustBeInitializedWarning.kt - 1c1b0dec9ea0973e8100b73ec68a4c78 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInSecondary_errorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInSecondary_errorAnyway.antlrtree.txt new file mode 100644 index 000000000..e18ddbd84 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInSecondary_errorAnyway.antlrtree.txt @@ -0,0 +1,153 @@ +File: noPrimary_partialDeferredInitInSecondary_errorAnyway.kt - dfc2d87664e9486dbb5c9ab314114e29 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInTwoSecondaries_errorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInTwoSecondaries_errorAnyway.antlrtree.txt new file mode 100644 index 000000000..75f202e4a --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_partialDeferredInitInTwoSecondaries_errorAnyway.antlrtree.txt @@ -0,0 +1,113 @@ +File: noPrimary_partialDeferredInitInTwoSecondaries_errorAnyway.kt - 7e099fd7a1facdc9e17ea8fd81542363 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedError.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedError.antlrtree.txt new file mode 100644 index 000000000..7a5092f79 --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedError.antlrtree.txt @@ -0,0 +1,114 @@ +File: noPrimary_twoSecondary_mustBeInitializedError.kt - 598309b7d7192efab03da4d53cad8d2f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedWarning.antlrtree.txt new file mode 100644 index 000000000..59143627a --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/noPrimary_twoSecondary_mustBeInitializedWarning.antlrtree.txt @@ -0,0 +1,114 @@ +File: noPrimary_twoSecondary_mustBeInitializedWarning.kt - f882fb122871a1328303a59c3bb6fe9a + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/onePrimary_oneSecondary_errorAnyway.antlrtree.txt b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/onePrimary_oneSecondary_errorAnyway.antlrtree.txt new file mode 100644 index 000000000..48eb8290e --- /dev/null +++ b/grammar/testData/diagnostics/backingField/prohibitMissedMustBeInitializedWhenThereIsNoPrimaryConstructor/onePrimary_oneSecondary_errorAnyway.antlrtree.txt @@ -0,0 +1,118 @@ +File: onePrimary_oneSecondary_errorAnyway.kt - 10191074c6bd073b34b766bc3ef0aed6 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/adapted/adaptationByExpectTypeOutsideCall.antlrtree.txt b/grammar/testData/diagnostics/callableReference/adapted/adaptationByExpectTypeOutsideCall.antlrtree.txt new file mode 100644 index 000000000..145b060b8 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/adapted/adaptationByExpectTypeOutsideCall.antlrtree.txt @@ -0,0 +1,1275 @@ +File: adaptationByExpectTypeOutsideCall.kt - 10cb4c40a39b85296b7c8fa3be3ee5df + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("options") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("normalizeNames") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("id") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("runForString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cs") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("dumpStrategy") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dump0") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dump1") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dump2") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dumpStrategy") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("KotlinLike") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dump3") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("dump4") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dumpStrategy") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("KotlinLike") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dump4") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("dump4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dumpStrategy") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("KotlinLike") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("dump5") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("cs") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dump5") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("dump5") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dumpStrategy") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("KotlinLike") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dump5") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("expectString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/adapted/adaptationInWhenWithMapOf.antlrtree.txt b/grammar/testData/diagnostics/callableReference/adapted/adaptationInWhenWithMapOf.antlrtree.txt new file mode 100644 index 000000000..d6bd35946 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/adapted/adaptationInWhenWithMapOf.antlrtree.txt @@ -0,0 +1,204 @@ +File: adaptationInWhenWithMapOf.kt - 4411104625356715ee9eceb32e9c237f + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mapOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("a") + QUOTE_CLOSE(""") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("b") + QUOTE_CLOSE(""") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + COMMA(",") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/adapted/adaptationToOverridenWithoutDefault.antlrtree.txt b/grammar/testData/diagnostics/callableReference/adapted/adaptationToOverridenWithoutDefault.antlrtree.txt new file mode 100644 index 000000000..d6c3a4949 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/adapted/adaptationToOverridenWithoutDefault.antlrtree.txt @@ -0,0 +1,412 @@ +File: adaptationToOverridenWithoutDefault.kt - 47d48ccf76d41ae433563f7327acbf2d + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Some") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SomeImpl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Some") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("buz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("buz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeImpl") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("actionForAll") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("actionForAll") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/adapted/noKFunctionForAdaptation.antlrtree.txt b/grammar/testData/diagnostics/callableReference/adapted/noKFunctionForAdaptation.antlrtree.txt new file mode 100644 index 000000000..45b1ffe3e --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/adapted/noKFunctionForAdaptation.antlrtree.txt @@ -0,0 +1,760 @@ +File: noKFunctionForAdaptation.kt - d3b13bc15422c381bba9405a528e78a6 + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("O") + QUOTE_CLOSE(""") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("K") + QUOTE_CLOSE(""") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("dump") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("dumpStrategy") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("k0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("KFunction0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returnAdapter") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("k1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("KFunction0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("k2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("KFunction0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dumpStrategy") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("KotlinLike") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Function0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returnAdapter") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Function0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Function0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dumpStrategy") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("KotlinLike") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("returnAdapter") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("KFunction0") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/adapted/simpleAdaptationOutsideOfCall.antlrtree.txt b/grammar/testData/diagnostics/callableReference/adapted/simpleAdaptationOutsideOfCall.antlrtree.txt new file mode 100644 index 000000000..8d9757052 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/adapted/simpleAdaptationOutsideOfCall.antlrtree.txt @@ -0,0 +1,231 @@ +File: simpleAdaptationOutsideOfCall.kt - 717ba3da2ba930f822424789374582b5 + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("options") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("runForString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("dumpStrategy") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dump0") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("runForString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/callableReferencesToCompanionMembers.antlrtree.txt b/grammar/testData/diagnostics/callableReference/callableReferencesToCompanionMembers.antlrtree.txt new file mode 100644 index 000000000..025fa8594 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/callableReferencesToCompanionMembers.antlrtree.txt @@ -0,0 +1,218 @@ +File: callableReferencesToCompanionMembers.kt - 2908e9f0497a5f003b9c8f74a0174e03 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("baz") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/deprecateTopLevelReferenceWithCompanionLHS.antlrtree.txt b/grammar/testData/diagnostics/callableReference/deprecateTopLevelReferenceWithCompanionLHS.antlrtree.txt new file mode 100644 index 000000000..d4d2486c8 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/deprecateTopLevelReferenceWithCompanionLHS.antlrtree.txt @@ -0,0 +1,2115 @@ +File: deprecateTopLevelReferenceWithCompanionLHS.kt - 25a849f6de70824a824ef0ee9880321e + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("43") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("companionProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("44") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Obj") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("43") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("objProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("44") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x0") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("z") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("z") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bam") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("baz") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Obj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("zObj") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Obj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("zObj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Obj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("mainProp") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x0") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("companionProp") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("memberProp") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("z") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("memberProp") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("z") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bam") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("memberProp") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Obj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("objProp") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("zObj") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Obj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("objProp") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("zObj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Obj") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("objProp") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("id") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bam") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/generic/boundViolated.antlrtree.txt b/grammar/testData/diagnostics/callableReference/generic/boundViolated.antlrtree.txt new file mode 100644 index 000000000..f4745cce8 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/generic/boundViolated.antlrtree.txt @@ -0,0 +1,218 @@ +File: boundViolated.kt - 9b28ab4900b25463356ae053bcbfe877 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("genericValue") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("genericValue") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/generic/incorrectNumberOfTypeArguments.antlrtree.txt b/grammar/testData/diagnostics/callableReference/generic/incorrectNumberOfTypeArguments.antlrtree.txt new file mode 100644 index 000000000..e1c8bf869 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/generic/incorrectNumberOfTypeArguments.antlrtree.txt @@ -0,0 +1,319 @@ +File: incorrectNumberOfTypeArguments.kt - 29d7147a97fb2c0a5ff22685b20b4fcd + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("I") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("J") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("genericValue") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Triple") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("J") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("genericValue") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("genericValue") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/genericTypealiasInLhs.antlrtree.txt b/grammar/testData/diagnostics/callableReference/genericTypealiasInLhs.antlrtree.txt new file mode 100644 index 000000000..407476448 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/genericTypealiasInLhs.antlrtree.txt @@ -0,0 +1,5849 @@ +File: genericTypealiasInLhs.kt - 723a7c46db21249ddc6e98ea54fce6f1 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Some") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("SomeAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Some") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("SomeUnusedAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Some") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Some") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Some") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeUnusedAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Inv") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("InvAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("InvSpecificAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedCorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnusedIncorrectAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvSpecificAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("BoundedPair") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Q") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairInverted") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Q") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Q") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Q") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Q") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairBothAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BoundedPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairInverted") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondFixedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairFirstUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSecondUnusedAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairBothAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BoundedPairSpecificAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/property/mutablePropertyViaDelegation.antlrtree.txt b/grammar/testData/diagnostics/callableReference/property/mutablePropertyViaDelegation.antlrtree.txt new file mode 100644 index 000000000..e82851080 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/property/mutablePropertyViaDelegation.antlrtree.txt @@ -0,0 +1,380 @@ +File: mutablePropertyViaDelegation.kt - f428f0a545571a5215f079e53094a2d8 + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KMutableProperty0") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty0") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MkMutableSharedSettingsHolder") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("cleanTarget") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("MakefileSettingsFacade") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("projectSettings") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MkMutableSharedSettingsHolder") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("MkMutableSharedSettingsHolder") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("projectSettings") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("cleanTarget2") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("consume") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MakefileSettingsFacade") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty0") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("cleanTarget") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KMutableProperty0") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("cleanTarget") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/referenceInCycleInProperties.antlrtree.txt b/grammar/testData/diagnostics/callableReference/referenceInCycleInProperties.antlrtree.txt new file mode 100644 index 000000000..2317f64c7 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/referenceInCycleInProperties.antlrtree.txt @@ -0,0 +1,455 @@ +File: referenceInCycleInProperties.kt - 68493db38eeab71ff733934e344006ed + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Parser") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("parseString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("parse") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("parse") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("content") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Some") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("strings") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("parser") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Parser") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("parseString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOfInt") + semis + NL("\n") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("listOfString") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("strings") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("listOfInt") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOfString") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("parser") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("parse") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/resolve/onlyInputTypesOnCallableReference.antlrtree.txt b/grammar/testData/diagnostics/callableReference/resolve/onlyInputTypesOnCallableReference.antlrtree.txt new file mode 100644 index 000000000..6adc3693c --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/resolve/onlyInputTypesOnCallableReference.antlrtree.txt @@ -0,0 +1,313 @@ +File: onlyInputTypesOnCallableReference.kt - 9ba8f1a14880126e596ad046d5fd7a7f + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("BaseClass") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DerivedClass") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseClass") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("derivedToStringMap") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Map") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DerivedClass") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mapOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("mapper") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BaseClass") + RPAREN(")") + ARROW("->") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("derivedToStringMap") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + GET("get") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mapper") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("derivedToStringMap") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + GET("get") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("mapper") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BaseClass") + RPAREN(")") + ARROW("->") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/unsupported/classLiteralsWithEmptyLHS.antlrtree.txt b/grammar/testData/diagnostics/callableReference/unsupported/classLiteralsWithEmptyLHS.antlrtree.txt new file mode 100644 index 000000000..8e69fc48f --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/unsupported/classLiteralsWithEmptyLHS.antlrtree.txt @@ -0,0 +1,220 @@ +File: classLiteralsWithEmptyLHS.kt - c820580e76887d802e5d2d1bb909c97a + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("regular") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Any") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + DOT(".") + simpleIdentifier + Identifier("extension") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("member") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/unsupported/javaOverridesKotlinProperty.Main.antlrtree.txt b/grammar/testData/diagnostics/callableReference/unsupported/javaOverridesKotlinProperty.Main.antlrtree.txt new file mode 100644 index 000000000..7b69eda0b --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/unsupported/javaOverridesKotlinProperty.Main.antlrtree.txt @@ -0,0 +1,93 @@ +File: javaOverridesKotlinProperty.Main.kt - 96df001a290083291863c702fc3dec6f + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("904") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("prop") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.Main.antlrtree.txt b/grammar/testData/diagnostics/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.Main.antlrtree.txt new file mode 100644 index 000000000..fc3164804 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.Main.antlrtree.txt @@ -0,0 +1,93 @@ +File: referenceToKotlinPropertyViaIntermediateJavaClass.Main.kt - 96df001a290083291863c702fc3dec6f + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("904") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("prop") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/callableReference/unsupported/syntheticPropertiesOnJavaAnnotation.Main.antlrtree.txt b/grammar/testData/diagnostics/callableReference/unsupported/syntheticPropertiesOnJavaAnnotation.Main.antlrtree.txt new file mode 100644 index 000000000..e4c61a5e7 --- /dev/null +++ b/grammar/testData/diagnostics/callableReference/unsupported/syntheticPropertiesOnJavaAnnotation.Main.antlrtree.txt @@ -0,0 +1,37 @@ +File: syntheticPropertiesOnJavaAnnotation.Main.kt - 75b8a3a993658ead09ed5d15ca7c3bb0 + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("prop") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnInterface") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("javaMethod") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/cast/AsInCompoundAssignment.antlrtree.txt b/grammar/testData/diagnostics/cast/AsInCompoundAssignment.antlrtree.txt new file mode 100644 index 000000000..60e85fcc3 --- /dev/null +++ b/grammar/testData/diagnostics/cast/AsInCompoundAssignment.antlrtree.txt @@ -0,0 +1,139 @@ +File: AsInCompoundAssignment.kt - 3da0e8b3100b5537c019eb4a3da2a67e + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + DOT(".") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("b") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/checkArguments/kt51062Error.main.antlrtree.txt b/grammar/testData/diagnostics/checkArguments/kt51062Error.main.antlrtree.txt new file mode 100644 index 000000000..6a8174194 --- /dev/null +++ b/grammar/testData/diagnostics/checkArguments/kt51062Error.main.antlrtree.txt @@ -0,0 +1,859 @@ +File: kt51062Error.main.kt - e5683b7ebe8baf9e7fea49b6dc2f185b + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IntRange") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Iterable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("a") + QUOTE_CLOSE(""") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("z") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("In") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("append4") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IntRange") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSmartList") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("takes") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/checkTypeWithExactTest.antlrtree.txt b/grammar/testData/diagnostics/checkTypeWithExactTest.antlrtree.txt new file mode 100644 index 000000000..83b9987f1 --- /dev/null +++ b/grammar/testData/diagnostics/checkTypeWithExactTest.antlrtree.txt @@ -0,0 +1,469 @@ +File: checkTypeWithExactTest.kt - 552be5a44c9c2002d1565b38fee9cd26 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("B") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("expr") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkExactType") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expr") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkExactType") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expr") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkExactType") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expr") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkTypeEquality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expr") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkTypeEquality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expr") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkTypeEquality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expr") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/classLiteral/parameterizedTypeAlias.antlrtree.txt b/grammar/testData/diagnostics/classLiteral/parameterizedTypeAlias.antlrtree.txt new file mode 100644 index 000000000..bbed89258 --- /dev/null +++ b/grammar/testData/diagnostics/classLiteral/parameterizedTypeAlias.antlrtree.txt @@ -0,0 +1,1409 @@ +File: parameterizedTypeAlias.kt - 94d87e00d1f27747b29373af9d3af08a + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Inv") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Some") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MyPair") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("B") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("InvAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("InvUnused") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("SomeAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Some") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("PairAliasSingle") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("PairAliasUsual") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("B") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("PairAliasReversed") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("B") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("PairAliasTwoWithUnused") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("B") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("PairAliasSpecific") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("SimpleArrayAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("SpecificArrayAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("UnusedArrayAlias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnused") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvUnused") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Some") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyPair") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyPair") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasSingle") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasSingle") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasReversed") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasReversed") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasUsual") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasUsual") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasSpecific") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasTwoWithUnused") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PairAliasTwoWithUnused") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Array") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Array") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Array") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SimpleArrayAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SimpleArrayAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SimpleArrayAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SpecificArrayAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("UnusedArrayAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("UnusedArrayAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("UnusedArrayAlias") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/comparingArbitraryClasses.antlrtree.txt b/grammar/testData/diagnostics/comparingArbitraryClasses.antlrtree.txt new file mode 100644 index 000000000..d794a5c1b --- /dev/null +++ b/grammar/testData/diagnostics/comparingArbitraryClasses.antlrtree.txt @@ -0,0 +1,134 @@ +File: comparingArbitraryClasses.kt - b51160f3ce508621939fdf5dc9232597 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/comparingCallableReferencesWithInstanceOfJavaClass.Main.antlrtree.txt b/grammar/testData/diagnostics/comparingCallableReferencesWithInstanceOfJavaClass.Main.antlrtree.txt new file mode 100644 index 000000000..abd0d20f6 --- /dev/null +++ b/grammar/testData/diagnostics/comparingCallableReferencesWithInstanceOfJavaClass.Main.antlrtree.txt @@ -0,0 +1,306 @@ +File: comparingCallableReferencesWithInstanceOfJavaClass.Main.kt - 62a02e0b4b5285f5ddf09229c74aedc7 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("K") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("J") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("K") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("f") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("k") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("f") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("k") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("f") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("K") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("f") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/comparisonOfGenericInterfaceWithGenericClass.antlrtree.txt b/grammar/testData/diagnostics/comparisonOfGenericInterfaceWithGenericClass.antlrtree.txt new file mode 100644 index 000000000..e05a3b254 --- /dev/null +++ b/grammar/testData/diagnostics/comparisonOfGenericInterfaceWithGenericClass.antlrtree.txt @@ -0,0 +1,123 @@ +File: comparisonOfGenericInterfaceWithGenericClass.kt - af3283c59e570d9d10edb7b377e55bc2 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/constructorConsistency/errorInsideDelegationCallNoPrimary.antlrtree.txt b/grammar/testData/diagnostics/constructorConsistency/errorInsideDelegationCallNoPrimary.antlrtree.txt new file mode 100644 index 000000000..b707ed10c --- /dev/null +++ b/grammar/testData/diagnostics/constructorConsistency/errorInsideDelegationCallNoPrimary.antlrtree.txt @@ -0,0 +1,118 @@ +File: errorInsideDelegationCallNoPrimary.kt - b3cfda44ca54e35d3cb64c7f256c9bde + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/constructorConsistency/parametersVsPropertiesFromPrimaryConstructor.antlrtree.txt b/grammar/testData/diagnostics/constructorConsistency/parametersVsPropertiesFromPrimaryConstructor.antlrtree.txt new file mode 100644 index 000000000..439014214 --- /dev/null +++ b/grammar/testData/diagnostics/constructorConsistency/parametersVsPropertiesFromPrimaryConstructor.antlrtree.txt @@ -0,0 +1,555 @@ +File: parametersVsPropertiesFromPrimaryConstructor.kt - 2bc0317390e64c376f4e5abce3f6902f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Test") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/constructorConsistency/twoSuperTypeCalls.antlrtree.txt b/grammar/testData/diagnostics/constructorConsistency/twoSuperTypeCalls.antlrtree.txt new file mode 100644 index 000000000..9649cc457 --- /dev/null +++ b/grammar/testData/diagnostics/constructorConsistency/twoSuperTypeCalls.antlrtree.txt @@ -0,0 +1,135 @@ +File: twoSuperTypeCalls.kt - c8aaf50edfacf6994122becfca0b8a9e + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("B") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_function.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_function.antlrtree.txt new file mode 100644 index 000000000..3600e86bd --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_function.antlrtree.txt @@ -0,0 +1,4133 @@ +File: accessToCompanionInBaseEnumInitSection_function.kt - 9e330c394bf665792381512fbba05902 + NL("\n") + NL("\n") + fileAnnotation + AT_PRE_WS("\n@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalContracts") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + simpleIdentifier + Identifier("ExperimentalContracts") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + simpleIdentifier + Identifier("contract") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("properties") + DOT(".") + simpleIdentifier + Identifier("ReadOnlyProperty") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Enum") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + RCURL("}") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Local") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("localFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("D") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("someObj") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("localFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo()") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumWithConstructor") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + RPAREN(")") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo()") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + simpleIdentifier + Identifier("provideDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("prop") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ReadOnlyProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ReadOnlyProperty") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("inPlaceRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callsInPlace") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("nonInPlaceRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("inPlaceDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ReadOnlyProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callsInPlace") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ReadOnlyProperty") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("nonInPlaceDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ReadOnlyProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ReadOnlyProperty") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_property.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_property.antlrtree.txt new file mode 100644 index 000000000..b81e070b9 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/accessToCompanionInBaseEnumInitSection_property.antlrtree.txt @@ -0,0 +1,3826 @@ +File: accessToCompanionInBaseEnumInitSection_property.kt - cb529e2d0972440184a94fd891fca8fa + NL("\n") + NL("\n") + fileAnnotation + AT_PRE_WS("\n@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalContracts") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + simpleIdentifier + Identifier("ExperimentalContracts") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + simpleIdentifier + Identifier("contract") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("properties") + DOT(".") + simpleIdentifier + Identifier("ReadOnlyProperty") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Enum") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + RCURL("}") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Local") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("localFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("D") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("someObj") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInside") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInside") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cInit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("eInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fInit") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("localFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceDelegate") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("value") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumWithConstructor") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonInPlaceRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + RPAREN(")") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("value") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + simpleIdentifier + Identifier("provideDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("prop") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ReadOnlyProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ReadOnlyProperty") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("inPlaceRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callsInPlace") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("nonInPlaceRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("inPlaceDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ReadOnlyProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callsInPlace") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ReadOnlyProperty") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("nonInPlaceDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ReadOnlyProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ReadOnlyProperty") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.KotlinBase.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.KotlinBase.antlrtree.txt new file mode 100644 index 000000000..34f94e61a --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.KotlinBase.antlrtree.txt @@ -0,0 +1,65 @@ +File: assignmentOfSyntheticVarWithInconsistentNullability.KotlinBase.kt - 109e1c87541fdda1c98d8e0be4e6827a + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("KotlinBase") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.main.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.main.antlrtree.txt new file mode 100644 index 000000000..c0d6867f9 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/assignmentOfSyntheticVarWithInconsistentNullability.main.antlrtree.txt @@ -0,0 +1,378 @@ +File: assignmentOfSyntheticVarWithInconsistentNullability.main.kt - 7bf3fddc7c9b9bc336f01c3bbf8a3155 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NoOverride") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaBase") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaOverride") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KotlinOverrideBase") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_5") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KotlinOverride") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.antlrtree.txt new file mode 100644 index 000000000..9b2b4dbf4 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/capturingUninitializedVariableInNonInPlaceLambda.antlrtree.txt @@ -0,0 +1,1808 @@ +File: capturingUninitializedVariableInNonInPlaceLambda.kt - 21d0e8d3d54bd08e7b5a76c7711aea90 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("capture") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalContracts") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("inPlace") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callsInPlace") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvocationKind") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("EXACTLY_ONCE") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("consume") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("objectProp") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inPlace") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("localFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("capture") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("localFun") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt new file mode 100644 index 000000000..7fe127dfe --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt @@ -0,0 +1,41 @@ +File: cfgOfFullyIncorrectCode.kt - 42e28eb7a0614778b6d46198c6552798 + NL("\n") + NL("\n") + LCURL("{") + NL("\n") + NL("\n") + TRY("try") + LCURL("{") + NL("\n") + Identifier("with") + LPAREN("(") + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + LCURL("{") + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + RETURN("return") + NL("\n") + NL("\n") + RCURL("}") + RCURL("}") + RCURL("}") + NL("\n") + NL("\n") + FINALLY("finally") + NL("\n") + NL("\n") + NL("\n") + TRY("try") + LCURL("{") + RCURL("}") + NL("\n") + NL("\n") + FINALLY("finally") + NL("\n") + packageHeader + importList + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/initializationInUnreachableCode.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/initializationInUnreachableCode.antlrtree.txt new file mode 100644 index 000000000..16564a83a --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/initializationInUnreachableCode.antlrtree.txt @@ -0,0 +1,178 @@ +File: initializationInUnreachableCode.kt - 58c925ab2125a21993669ded8af20eb0 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("error") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Exception") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Some") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("error") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/reassignementInUnreachableCode.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/reassignementInUnreachableCode.antlrtree.txt new file mode 100644 index 000000000..1bff9a946 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/reassignementInUnreachableCode.antlrtree.txt @@ -0,0 +1,86 @@ +File: reassignementInUnreachableCode.kt - 88b0ce70a8aa2915569a4470a1f028ac + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + NL("\n") + controlStructureBody + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/returnAliasedUnitNotRequired.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/returnAliasedUnitNotRequired.antlrtree.txt new file mode 100644 index 000000000..40d3814c7 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/returnAliasedUnitNotRequired.antlrtree.txt @@ -0,0 +1,119 @@ +File: returnAliasedUnitNotRequired.kt - 1643df21f32988c38d02398a7ce854ad + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + PRIVATE("private") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("T") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("x") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("something") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("something") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/singleReturnFromTry.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/singleReturnFromTry.antlrtree.txt new file mode 100644 index 000000000..708414618 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/definiteReturn/singleReturnFromTry.antlrtree.txt @@ -0,0 +1,711 @@ +File: singleReturnFromTry.kt - e07488d0d917993cea16270e594e6de5 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + simpleIdentifier + Identifier("myRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Exception") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/delegatedConstructorArguments.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/delegatedConstructorArguments.antlrtree.txt new file mode 100644 index 000000000..69e858fb9 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/delegatedConstructorArguments.antlrtree.txt @@ -0,0 +1,482 @@ +File: delegatedConstructorArguments.kt - 237324eceeaede93c9fa043464d0ec64 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Test") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("values") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("map") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Map") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("map") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("values") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("values") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + SET("set") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Set") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + SET("set") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("values") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + modifiers + modifier + visibilityModifier + PRIVATE("private") + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("values") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/delegatedMemberProperyWriteInInit.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/delegatedMemberProperyWriteInInit.antlrtree.txt new file mode 100644 index 000000000..b4ba3d9c5 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/delegatedMemberProperyWriteInInit.antlrtree.txt @@ -0,0 +1,707 @@ +File: delegatedMemberProperyWriteInInit.kt - f048d00f26a65a20ae1becad463401a0 + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Delegate") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + DELEGATE("delegate") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("consume") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + DELEGATE("delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + DELEGATE("delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/inlinedBreakContinueFeatureDisabled.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/inlinedBreakContinueFeatureDisabled.antlrtree.txt new file mode 100644 index 000000000..1d311bef7 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/inlinedBreakContinueFeatureDisabled.antlrtree.txt @@ -0,0 +1,1291 @@ +File: inlinedBreakContinueFeatureDisabled.kt - d92c182d29465a0973d978818d76a1eb + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block1") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + COMMA(",") + functionValueParameter + parameterModifiers + parameterModifier + NOINLINE("noinline") + parameter + simpleIdentifier + Identifier("block2") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + COMMA(",") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("block3") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + CONTINUE("continue") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + CONTINUE("continue") + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + CONTINUE("continue") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + CONTINUE("continue") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + CONTINUE("continue") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/reassignmentInCatch.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/reassignmentInCatch.antlrtree.txt new file mode 100644 index 000000000..67f57861c --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/reassignmentInCatch.antlrtree.txt @@ -0,0 +1,295 @@ +File: reassignmentInCatch.kt - cb09ecc988b2f174e69a686b98720b1b + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Exception") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hmm") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Exception") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/safeCallAfterVariableInitialization.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/safeCallAfterVariableInitialization.antlrtree.txt new file mode 100644 index 000000000..d67a0697e --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/safeCallAfterVariableInitialization.antlrtree.txt @@ -0,0 +1,138 @@ +File: safeCallAfterVariableInitialization.kt - 64100f7a3b6c987c9439af44c1099399 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/smartCastInCatch.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/smartCastInCatch.antlrtree.txt new file mode 100644 index 000000000..53842328b --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/smartCastInCatch.antlrtree.txt @@ -0,0 +1,472 @@ +File: smartCastInCatch.kt - a80f5de85f5e5b7fbcb83345de1044c2 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("exc") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("flag") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("RuntimeException") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("flag") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("exc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("exc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + excl + EXCL_NO_WS("!") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Throwable") + RPAREN(")") + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/uninintializedProperyWithDirectAndDelayedInitialization.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/uninintializedProperyWithDirectAndDelayedInitialization.antlrtree.txt new file mode 100644 index 000000000..515e50234 --- /dev/null +++ b/grammar/testData/diagnostics/controlFlowAnalysis/uninintializedProperyWithDirectAndDelayedInitialization.antlrtree.txt @@ -0,0 +1,247 @@ +File: uninintializedProperyWithDirectAndDelayedInitialization.kt - cf5274b52b3b09fa53a57d8ebe762aab + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlStructures/continueInInitBlock.antlrtree.txt b/grammar/testData/diagnostics/controlStructures/continueInInitBlock.antlrtree.txt new file mode 100644 index 000000000..6a3f4886e --- /dev/null +++ b/grammar/testData/diagnostics/controlStructures/continueInInitBlock.antlrtree.txt @@ -0,0 +1,123 @@ +File: continueInInitBlock.kt - 05f79e5198a765d02f4c9f43a1d47a6d + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + CONTINUE("continue") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlStructures/forWithIncorrectTypeSpecializer.antlrtree.txt b/grammar/testData/diagnostics/controlStructures/forWithIncorrectTypeSpecializer.antlrtree.txt new file mode 100644 index 000000000..80008809c --- /dev/null +++ b/grammar/testData/diagnostics/controlStructures/forWithIncorrectTypeSpecializer.antlrtree.txt @@ -0,0 +1,222 @@ +File: forWithIncorrectTypeSpecializer.kt - aac13245045add4c19cc391f565bcecc + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("derivedList") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Derived") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Derived") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Derived") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("derived") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("derivedList") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlStructures/incorrectElvis.antlrtree.txt b/grammar/testData/diagnostics/controlStructures/incorrectElvis.antlrtree.txt new file mode 100644 index 000000000..a0da0eea7 --- /dev/null +++ b/grammar/testData/diagnostics/controlStructures/incorrectElvis.antlrtree.txt @@ -0,0 +1,84 @@ +File: incorrectElvis.kt - 6d6acc8bef63d52b5f6fea838d89a27f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("smth") + QUOTE_CLOSE(""") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt b/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt new file mode 100644 index 000000000..108b136cb --- /dev/null +++ b/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt @@ -0,0 +1,74 @@ +File: whenWithNoSubjectAndCommas.kt - 8f9c4164b0f097cc571f276c956d8192 + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("someFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + WHEN("when") + LCURL("{") + NL("\n") + IS("is") + Identifier("SomeClass") + COMMA(",") + IS("is") + Identifier("OtherClass") + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + WHEN("when") + LCURL("{") + NL("\n") + Identifier("x") + EQEQ("==") + IntegerLiteral("1") + COMMA(",") + Identifier("x") + EQEQ("==") + IntegerLiteral("2") + ARROW("->") + LCURL("{") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.I.antlrtree.txt b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.I.antlrtree.txt new file mode 100644 index 000000000..1a753bb9e --- /dev/null +++ b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.I.antlrtree.txt @@ -0,0 +1,50 @@ +File: kotlinJavaKotlinCycle.ll.I.kt - 80a2c948fd8bbea13bd02f45bfe9e67e + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("I") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("K") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.K.antlrtree.txt b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.K.antlrtree.txt new file mode 100644 index 000000000..32d0de6fa --- /dev/null +++ b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaKotlinCycle.ll.K.antlrtree.txt @@ -0,0 +1,49 @@ +File: kotlinJavaKotlinCycle.ll.K.kt - 5e95812431839afa9b9e0f58a97284be + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("K") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("J") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.ExceptionTracker.antlrtree.txt b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.ExceptionTracker.antlrtree.txt new file mode 100644 index 000000000..d0fc02aff --- /dev/null +++ b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.ExceptionTracker.antlrtree.txt @@ -0,0 +1,30 @@ +File: kotlinJavaNestedCycle.ll.ExceptionTracker.kt - 2041ce8b7e288e0e7af08cec46f1f08c + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ExceptionTracker") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("LockBasedStorageManager") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("ExceptionHandlingStrategy") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.StorageManager.antlrtree.txt b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.StorageManager.antlrtree.txt new file mode 100644 index 000000000..276a244ee --- /dev/null +++ b/grammar/testData/diagnostics/cyclicHierarchy/kotlinJavaNestedCycle.ll.StorageManager.antlrtree.txt @@ -0,0 +1,37 @@ +File: kotlinJavaNestedCycle.ll.StorageManager.kt - 35784e2299bd2abf98dd0b28bf7c5618 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("StorageManager") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ExceptionTracker") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/decoratedLambda.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/decoratedLambda.antlrtree.txt new file mode 100644 index 000000000..246001679 --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/decoratedLambda.antlrtree.txt @@ -0,0 +1,356 @@ +File: decoratedLambda.kt - 9a41cd3df806c08241bbcd9467ec4b36 + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("P2") + RANGLE(">") + simpleIdentifier + Identifier("xComponent") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("builder") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + parameter + simpleIdentifier + Identifier("prop1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P2") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + parameter + simpleIdentifier + Identifier("prop1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P2") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("P1") + RANGLE(">") + receiverType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + parameter + simpleIdentifier + Identifier("prop1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P1") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + parameter + simpleIdentifier + Identifier("prop1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P1") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("pdfDocumentViewer") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("xComponent") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ARROW("->") + NL("\n") + statements + RCURL("}") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("xPDFDocumentViewer") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("href") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("?\n") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pdfDocumentViewer") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("href") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/elvisInDelegated.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/elvisInDelegated.antlrtree.txt new file mode 100644 index 000000000..7e548ea3c --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/elvisInDelegated.antlrtree.txt @@ -0,0 +1,435 @@ +File: elvisInDelegated.kt - 5368ac540936ada157aaa916f889da85 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Ref") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("D") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("hisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("t") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getElement") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("error") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/ifInDelegated.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/ifInDelegated.antlrtree.txt new file mode 100644 index 000000000..f0176ab4b --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/ifInDelegated.antlrtree.txt @@ -0,0 +1,499 @@ +File: ifInDelegated.kt - 6765d0943d00b3c11168824cf2f62c12 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Ref") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("D") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("hisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("t") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getElement") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/kt41952.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/kt41952.antlrtree.txt new file mode 100644 index 000000000..f9e68d1ae --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/kt41952.antlrtree.txt @@ -0,0 +1,521 @@ +File: kt41952.kt - fd9567d10e08dbff5ba099519251a2fd + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KClass") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Issue") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("strings") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bidir_collection") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("String") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeIssue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeIssue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("issue") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Issue") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Self") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + DOT(".") + simpleIdentifier + Identifier("bidir_collection") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("targetType") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KClass") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + RANGLE(">") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Delegate") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCalls.main.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCalls.main.antlrtree.txt new file mode 100644 index 000000000..d1d4271f3 --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCalls.main.antlrtree.txt @@ -0,0 +1,313 @@ +File: nestedPartiallyResolvedCalls.main.kt - b90f9b6db308e8aed9b6be1d30de566b + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("c") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + COMMA(",") + classParameter + simpleIdentifier + Identifier("myType") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("arguments") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("lazySoft") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("myType") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_WS("! ") + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCallsSimple.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCallsSimple.antlrtree.txt new file mode 100644 index 000000000..6185b4761 --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/nestedPartiallyResolvedCallsSimple.antlrtree.txt @@ -0,0 +1,421 @@ +File: nestedPartiallyResolvedCallsSimple.kt - 4335fc87b469fc2019ee26d281b17df2 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("KotlinVal") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("initializer") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("instance") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("metadata") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("myType") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + quest + QUEST_WS("?\n") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("arguments") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("KotlinVal") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/notNullAssertionInLocalDelegated.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/notNullAssertionInLocalDelegated.antlrtree.txt new file mode 100644 index 000000000..228a1b6cb --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/notNullAssertionInLocalDelegated.antlrtree.txt @@ -0,0 +1,401 @@ +File: notNullAssertionInLocalDelegated.kt - ee557e102a98a6123992aed1fe30cef6 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Ref") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("D") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("hisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("t") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getElement") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/inference/tryInGenerated.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/inference/tryInGenerated.antlrtree.txt new file mode 100644 index 000000000..c63633167 --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/inference/tryInGenerated.antlrtree.txt @@ -0,0 +1,425 @@ +File: tryInGenerated.kt - 749c6e9f81846966a4c0b32b383af3a4 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Ref") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("D") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("hisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("t") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getElement") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + statements + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/noInferenceFromGetValueThroughSetValue.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/noInferenceFromGetValueThroughSetValue.antlrtree.txt new file mode 100644 index 000000000..a3902ad4d --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/noInferenceFromGetValueThroughSetValue.antlrtree.txt @@ -0,0 +1,559 @@ +File: noInferenceFromGetValueThroughSetValue.kt - 18583b191d80d7b8bc717db38b2f6255 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("M") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("value") + QUOTE_CLOSE(""") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Z") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Z") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Z") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("U") + RANGLE(">") + simpleIdentifier + Identifier("m") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("U") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("M") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("a") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("b") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/noInferenceFromWrappedDelegate.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/noInferenceFromWrappedDelegate.antlrtree.txt new file mode 100644 index 000000000..c2841811d --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/noInferenceFromWrappedDelegate.antlrtree.txt @@ -0,0 +1,364 @@ +File: noInferenceFromWrappedDelegate.kt - 6691502163f006260e70edba87566e05 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("State") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("S") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAR("var") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("State") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("M") + RANGLE(">") + simpleIdentifier + Identifier("remember") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("list") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("remember") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("State") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + RPAREN(")") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("first") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/noPreliminarySetterInferenceForImplicitlyTypedVar.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/noPreliminarySetterInferenceForImplicitlyTypedVar.antlrtree.txt new file mode 100644 index 000000000..f1498b947 --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/noPreliminarySetterInferenceForImplicitlyTypedVar.antlrtree.txt @@ -0,0 +1,595 @@ +File: noPreliminarySetterInferenceForImplicitlyTypedVar.kt - 4abe4d6131ae04f1a93ce47b6f29f6b4 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Z") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Z") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Z") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("U") + RANGLE(">") + simpleIdentifier + Identifier("m") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("u") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("U") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("U") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mutableMapOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("b") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("23") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("and") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/provideDelegate/notNullAssertionInLocalDelegated.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/provideDelegate/notNullAssertionInLocalDelegated.antlrtree.txt new file mode 100644 index 000000000..18626aeec --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/provideDelegate/notNullAssertionInLocalDelegated.antlrtree.txt @@ -0,0 +1,634 @@ +File: notNullAssertionInLocalDelegated.kt - b1b9c2346e34009f582fbea16f0d3053 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Ref") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("D") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("GenericDelegate") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("G") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("G") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("provideDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("GenericDelegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GenericDelegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("t") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("W") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("GenericDelegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getElement") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ref") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("data2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getElement") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/provideDelegate/onObject.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/provideDelegate/onObject.antlrtree.txt new file mode 100644 index 000000000..c4ef76dfb --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/provideDelegate/onObject.antlrtree.txt @@ -0,0 +1,217 @@ +File: onObject.kt - cdaddf381eb681be9d29654ea37e8c78 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("O") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("provideDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/recursiveType.reversed.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/recursiveType.reversed.antlrtree.txt new file mode 100644 index 000000000..7c1e3e3b9 --- /dev/null +++ b/grammar/testData/diagnostics/delegatedProperty/recursiveType.reversed.antlrtree.txt @@ -0,0 +1,285 @@ +File: recursiveType.reversed.kt - 41f7b956ac9245afd41eda87c464d384 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Delegate") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegation/kt49477.reversed.antlrtree.txt b/grammar/testData/diagnostics/delegation/kt49477.reversed.antlrtree.txt new file mode 100644 index 000000000..50c0dd41c --- /dev/null +++ b/grammar/testData/diagnostics/delegation/kt49477.reversed.antlrtree.txt @@ -0,0 +1,940 @@ +File: kt49477.reversed.kt - 9183ffd9dfdbacc4393ecb851212311b + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("properties") + DOT(".") + simpleIdentifier + Identifier("ReadWriteProperty") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty1") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("Self") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + COMMA(",") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("Target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + DOT(".") + simpleIdentifier + Identifier("parent") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableCollection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + RANGLE(">") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + COMMA(",") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + quest + QUEST_NO_WS("?") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("GitLabBuildProcessor") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("processor") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("parent") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GitLabChangesProcessor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("buildProcessors") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("DatabaseEntity") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Entity") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Entity") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ResourceFactory") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ValueFilter") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Delegate") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Entity") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ReadWriteProperty") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ValueFilter") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + Identifier("name") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("desc") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + BY("by") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + Identifier("resource") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("factory") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ResourceFactory") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + Identifier("filter") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("filter") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("GitLabChangesProcessor") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("buildProcessors") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("child_many") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GitLabBuildProcessor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("java") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GitLabBuildProcessor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("processor") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Self") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + DOT(".") + simpleIdentifier + Identifier("child_many") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("clazz") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Class") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + COMMA(",") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + quest + QUEST_NO_WS("?") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PROPERTY("property") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableCollection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + RANGLE(">") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegation/kt49477Error.reversed.antlrtree.txt b/grammar/testData/diagnostics/delegation/kt49477Error.reversed.antlrtree.txt new file mode 100644 index 000000000..5fb7bd23e --- /dev/null +++ b/grammar/testData/diagnostics/delegation/kt49477Error.reversed.antlrtree.txt @@ -0,0 +1,941 @@ +File: kt49477Error.reversed.kt - 904f46fadb092dd07e34c74b4085f912 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("properties") + DOT(".") + simpleIdentifier + Identifier("ReadWriteProperty") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty1") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("Self") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + COMMA(",") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("Target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + DOT(".") + simpleIdentifier + Identifier("parent") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableCollection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + RANGLE(">") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + COMMA(",") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + quest + QUEST_NO_WS("?") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("GitLabBuildProcessor") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("processor") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("parent") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GitLabChangesProcessor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("buildProcessors") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("DatabaseEntity") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Entity") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Entity") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ResourceFactory") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ValueFilter") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Delegate") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Entity") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ReadWriteProperty") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ValueFilter") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + Identifier("name") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("desc") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + BY("by") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + Identifier("resource") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("factory") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ResourceFactory") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INFIX("infix") + FUN("fun") + simpleIdentifier + Identifier("filter") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("filter") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("GitLabChangesProcessor") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("buildProcessors") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("child_many") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GitLabBuildProcessor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("java") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GitLabBuildProcessor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("processor") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Self") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DatabaseEntity") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + DOT(".") + simpleIdentifier + Identifier("child_many") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("clazz") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Class") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + COMMA(",") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + quest + QUEST_NO_WS("?") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PROPERTY("property") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableCollection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Target") + RANGLE(">") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/delegationTypeMismatch.antlrtree.txt b/grammar/testData/diagnostics/delegationTypeMismatch.antlrtree.txt new file mode 100644 index 000000000..7d2fc8e0b --- /dev/null +++ b/grammar/testData/diagnostics/delegationTypeMismatch.antlrtree.txt @@ -0,0 +1,187 @@ +File: delegationTypeMismatch.kt - 2500103588c4cae3ff183b94a19e7cc1 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("d") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("B2") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("d") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedCompanionAndClassReference.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedCompanionAndClassReference.antlrtree.txt new file mode 100644 index 000000000..906735c35 --- /dev/null +++ b/grammar/testData/diagnostics/deprecated/deprecatedCompanionAndClassReference.antlrtree.txt @@ -0,0 +1,140 @@ +File: deprecatedCompanionAndClassReference.kt - 02fbde6846a328d759f9ef63cd7a137d + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Deprecated") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Deprecated companion") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.A.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.A.antlrtree.txt new file mode 100644 index 000000000..a99554df0 --- /dev/null +++ b/grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.A.antlrtree.txt @@ -0,0 +1,129 @@ +File: deprecatedConstructorProperty.A.kt - f163bf22b0621919ed9afdeae75cedc4 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Deprecated") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.use.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.use.antlrtree.txt new file mode 100644 index 000000000..65b96ebe8 --- /dev/null +++ b/grammar/testData/diagnostics/deprecated/deprecatedConstructorProperty.use.antlrtree.txt @@ -0,0 +1,125 @@ +File: deprecatedConstructorProperty.use.kt - 423e26ef353f21c87c39df995dfa1dfe + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("s") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.A.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.A.antlrtree.txt new file mode 100644 index 000000000..75681b945 --- /dev/null +++ b/grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.A.antlrtree.txt @@ -0,0 +1,66 @@ +File: deprecatedEnumEntry.A.kt - d973bd6a38b779b9dad00d8fa5bc7878 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Deprecated") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + simpleIdentifier + Identifier("DeprecatedEntry") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("RegularEntry") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.use.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.use.antlrtree.txt new file mode 100644 index 000000000..d3b08a4e0 --- /dev/null +++ b/grammar/testData/diagnostics/deprecated/deprecatedEnumEntry.use.antlrtree.txt @@ -0,0 +1,75 @@ +File: deprecatedEnumEntry.use.kt - 6bd0da79394e81a1225fbaa48438cfda + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("DeprecatedEntry") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("RegularEntry") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedField.use.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedField.use.antlrtree.txt new file mode 100644 index 000000000..cb3051b64 --- /dev/null +++ b/grammar/testData/diagnostics/deprecated/deprecatedField.use.antlrtree.txt @@ -0,0 +1,86 @@ +File: deprecatedField.use.kt - a3daba07399d5474a6fe3c5e4ca24791 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaClass") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("deprecatedField") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("regularField") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/derivedIntersectionPropertyShadowsBaseClassField.test.antlrtree.txt b/grammar/testData/diagnostics/derivedIntersectionPropertyShadowsBaseClassField.test.antlrtree.txt new file mode 100644 index 000000000..b2c4f790f --- /dev/null +++ b/grammar/testData/diagnostics/derivedIntersectionPropertyShadowsBaseClassField.test.antlrtree.txt @@ -0,0 +1,170 @@ +File: derivedIntersectionPropertyShadowsBaseClassField.test.kt - ac75347ee0e7af8e97df03a6f6d11ab4 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Proxy") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Intermediate") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText(" ") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Proxy") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Intermediate") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/differentNumericTypesFromSmartCast.antlrtree.txt b/grammar/testData/diagnostics/differentNumericTypesFromSmartCast.antlrtree.txt new file mode 100644 index 000000000..f3edc8376 --- /dev/null +++ b/grammar/testData/diagnostics/differentNumericTypesFromSmartCast.antlrtree.txt @@ -0,0 +1,197 @@ +File: differentNumericTypesFromSmartCast.kt - f8910b54b3b22613940a633f460621f6 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Float") + CONJ("&&") + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + CONJ("&&") + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Float") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReference.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReference.antlrtree.txt new file mode 100644 index 000000000..5c4573e9e --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReference.antlrtree.txt @@ -0,0 +1,233 @@ +File: conflictingPropertyEntriesAndReference.kt - d3dc5a350eb4e7575be343b55689b89b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ref") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("refType") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("refTypeWithAnyExpectedType") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferenceOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferenceOn.antlrtree.txt new file mode 100644 index 000000000..59bed9521 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferenceOn.antlrtree.txt @@ -0,0 +1,234 @@ +File: conflictingPropertyEntriesAndReferenceOn.kt - 849857d361665c91bfc93cade8a31c0d + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ref") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("refType") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("refTypeWithAnyExpectedType") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferencePrioritized.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferencePrioritized.antlrtree.txt new file mode 100644 index 000000000..2e0f8677f --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/conflictingPropertyEntriesAndReferencePrioritized.antlrtree.txt @@ -0,0 +1,234 @@ +File: conflictingPropertyEntriesAndReferencePrioritized.kt - 24186690edf3bc21538bdb63f7b357c1 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ref") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("refType") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("refTypeWithAnyExpectedType") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClash.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClash.antlrtree.txt new file mode 100644 index 000000000..a3667d46e --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClash.antlrtree.txt @@ -0,0 +1,409 @@ +File: entriesPropertyAsExtensionClash.kt - d47657d42ed1e241d0754b73ae6b90b1 + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Companion") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aCompanion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aCompanion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashOn.antlrtree.txt new file mode 100644 index 000000000..c136e930b --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashOn.antlrtree.txt @@ -0,0 +1,412 @@ +File: entriesPropertyAsExtensionClashOn.kt - 2eb0580613cabe636a5592f997823af1 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Companion") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aCompanion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aCompanion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashPrioritized.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashPrioritized.antlrtree.txt new file mode 100644 index 000000000..a99d6f6ac --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyAsExtensionClashPrioritized.antlrtree.txt @@ -0,0 +1,412 @@ +File: entriesPropertyAsExtensionClashPrioritized.kt - d9499e1d3d2f291294e11f3e2538a3c5 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Companion") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aCompanion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aCompanion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClash.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClash.antlrtree.txt new file mode 100644 index 000000000..0de079258 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClash.antlrtree.txt @@ -0,0 +1,207 @@ +File: entriesPropertyImportedClash.kt - f1258bf5d824a0c330768f286ccd1c55 + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("foo") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("entries") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashOn.antlrtree.txt new file mode 100644 index 000000000..98f6c6fc3 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashOn.antlrtree.txt @@ -0,0 +1,208 @@ +File: entriesPropertyImportedClashOn.kt - 143bfb9452efc787296963b103a56024 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("foo") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("entries") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashPrioritized.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashPrioritized.antlrtree.txt new file mode 100644 index 000000000..654c9033c --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyImportedClashPrioritized.antlrtree.txt @@ -0,0 +1,208 @@ +File: entriesPropertyImportedClashPrioritized.kt - d4c5add0574e574e3cfc32d10a46ac9c + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("foo") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("entries") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClash.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClash.antlrtree.txt new file mode 100644 index 000000000..2d4779a14 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClash.antlrtree.txt @@ -0,0 +1,410 @@ +File: entriesPropertyInCompanionClash.kt - 8902fe79df40a643c85abe1b500224a4 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("values") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aCompanion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aCompanion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClashOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClashOn.antlrtree.txt new file mode 100644 index 000000000..4f32f2309 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyInCompanionClashOn.antlrtree.txt @@ -0,0 +1,411 @@ +File: entriesPropertyInCompanionClashOn.kt - 1258a92bc4769891c1888381f81b5f77 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("values") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("aCompanion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aCompanion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClash.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClash.antlrtree.txt new file mode 100644 index 000000000..8436b307e --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClash.antlrtree.txt @@ -0,0 +1,227 @@ +File: entriesPropertyWithJvmStaticClash.kt - ffe3fefda2a847c412db421294a240a3 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmStatic") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashOn.antlrtree.txt new file mode 100644 index 000000000..bf66de4cd --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashOn.antlrtree.txt @@ -0,0 +1,228 @@ +File: entriesPropertyWithJvmStaticClashOn.kt - 65f801a3d0d90d68c79b20a84d7ae3de + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmStatic") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashPrioritized.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashPrioritized.antlrtree.txt new file mode 100644 index 000000000..4786e32fb --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesPropertyWithJvmStaticClashPrioritized.antlrtree.txt @@ -0,0 +1,228 @@ +File: entriesPropertyWithJvmStaticClashPrioritized.kt - 0792f9eaf2d51b709342bdfb5d127e7a + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmStatic") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/entriesUnsupported.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/entriesUnsupported.antlrtree.txt new file mode 100644 index 000000000..d8e0db9c2 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/entriesUnsupported.antlrtree.txt @@ -0,0 +1,76 @@ +File: entriesUnsupported.kt - 1bbe019c5d6039b7f111e5ddc188bbab + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Foo") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("BAR") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/enumEntriesAmbiguity.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/enumEntriesAmbiguity.antlrtree.txt new file mode 100644 index 000000000..3ec50f627 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/enumEntriesAmbiguity.antlrtree.txt @@ -0,0 +1,75 @@ +File: enumEntriesAmbiguity.kt - 42c603529958138c258b83379c7e8b13 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Ambiguous") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("first") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("entries") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Ambiguous") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ordinal") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClash.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClash.antlrtree.txt new file mode 100644 index 000000000..bd629f500 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClash.antlrtree.txt @@ -0,0 +1,172 @@ +File: genericEntriesPropertyClash.kt - 8417e5afd6862b889120dc563203ea5e + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClashOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClashOn.antlrtree.txt new file mode 100644 index 000000000..2ddb85de8 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/genericEntriesPropertyClashOn.antlrtree.txt @@ -0,0 +1,173 @@ +File: genericEntriesPropertyClashOn.kt - 23a7c48fc63f3d2807950212c87cc18e + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("entries") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguity.test.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguity.test.antlrtree.txt new file mode 100644 index 000000000..572cffb45 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguity.test.antlrtree.txt @@ -0,0 +1,103 @@ +File: javaEnumEntriesAmbiguity.test.kt - 43fa99876e2be378b8ebec12d1febd7e + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JEnumEntry") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JEnumStaticField") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JEnumField") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguityOn.test.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguityOn.test.antlrtree.txt new file mode 100644 index 000000000..4aa19578e --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/javaEnumEntriesAmbiguityOn.test.antlrtree.txt @@ -0,0 +1,179 @@ +File: javaEnumEntriesAmbiguityOn.test.kt - 04c861a7de1df8e1bcf06d7b5868bbc5 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("first") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JEnumEntry") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("second") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JEnumStaticField") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("third") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JEnumField") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("entries") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrRef("$first") + lineStringContent + LineStrRef("$second") + lineStringContent + LineStrRef("$third") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/javaFakeEnumEntries.test.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/javaFakeEnumEntries.test.antlrtree.txt new file mode 100644 index 000000000..06480cd5c --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/javaFakeEnumEntries.test.antlrtree.txt @@ -0,0 +1,157 @@ +File: javaFakeEnumEntries.test.kt - 01adc62849bb96799528b3ea6eedbdfa + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("JEnumStaticField") + DOT(".") + simpleIdentifier + Identifier("entries") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("JEnumStaticField") + DOT(".") + simpleIdentifier + Identifier("somethingElse") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("somethingElse") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("somethingElse") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntries.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntries.antlrtree.txt new file mode 100644 index 000000000..05eb08e3a --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntries.antlrtree.txt @@ -0,0 +1,353 @@ +File: nameShadowingOfExternallyDefinedEntries.kt - 6b4c857cc36071c274058b13f2f5c17e + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("E") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pckg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pckg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesOn.antlrtree.txt new file mode 100644 index 000000000..bdc26dd25 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesOn.antlrtree.txt @@ -0,0 +1,396 @@ +File: nameShadowingOfExternallyDefinedEntriesOn.kt - c0bf0bf95197a69bfabdcb541a7e0d3b + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("E") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pckg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pckg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesPrioritized.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesPrioritized.antlrtree.txt new file mode 100644 index 000000000..2d6fbf165 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/nameShadowingOfExternallyDefinedEntriesPrioritized.antlrtree.txt @@ -0,0 +1,396 @@ +File: nameShadowingOfExternallyDefinedEntriesPrioritized.kt - 7ce1f5396c178ef3092ddb61e9225839 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pckg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("E") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pckg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pckg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("entries") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsic.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsic.antlrtree.txt new file mode 100644 index 000000000..f985b980d --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsic.antlrtree.txt @@ -0,0 +1,98 @@ +File: redeclarationOfEnumEntriesNameWithIntrinsic.kt - e9412af7ff03c52aae76800f71820d72 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("entries") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("Entries") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsicOn.antlrtree.txt b/grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsicOn.antlrtree.txt new file mode 100644 index 000000000..90025c9c1 --- /dev/null +++ b/grammar/testData/diagnostics/enum/entries/redeclarationOfEnumEntriesNameWithIntrinsicOn.antlrtree.txt @@ -0,0 +1,113 @@ +File: redeclarationOfEnumEntriesNameWithIntrinsicOn.kt - 44e1908d530756a5cb789750a38c708e + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("entries") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("Entries") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ordinal") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("E") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("entries") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ordinal") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/equalityOfEnumAndParameter.antlrtree.txt b/grammar/testData/diagnostics/enum/equalityOfEnumAndParameter.antlrtree.txt new file mode 100644 index 000000000..03318a999 --- /dev/null +++ b/grammar/testData/diagnostics/enum/equalityOfEnumAndParameter.antlrtree.txt @@ -0,0 +1,1415 @@ +File: equalityOfEnumAndParameter.kt - 2bcdcf17ff0d6ddea303cc9eb0fe7122 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Buffered") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("flush") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("AIPowered") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("getAvatarReleaseYear") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("BufferedEnum") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Buffered") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("B") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("flush") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("UsualEnum") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("C") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("D") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("CleverEnum") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Buffered") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("AIPowered") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("E") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("F") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("flush") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getAvatarReleaseYear") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2022") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("P") + RANGLE(">") + simpleIdentifier + Identifier("processInfo1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("info") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("printer") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("P") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Buffered") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("P") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AIPowered") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("20") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BufferedEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("A") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("UsualEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("C") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("CleverEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("E") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("P") + RANGLE(">") + simpleIdentifier + Identifier("processInfo2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("info") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("printer") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("P") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AIPowered") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("P") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Buffered") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("20") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BufferedEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("A") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("UsualEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("C") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("CleverEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("E") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Printer") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") + simpleIdentifier + Identifier("print") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("command") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("P") + RANGLE(">") + simpleIdentifier + Identifier("processInfo3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("info") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("printer") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("P") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Buffered") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("P") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Printer") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("20") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BufferedEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("A") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("UsualEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("C") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("printer") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("CleverEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("E") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + simpleIdentifier + Identifier("rest") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + simpleIdentifier + Identifier("nest") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("K") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + simpleIdentifier + Identifier("mest") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("K") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/equalityOfFlexibleTypeParameters.B.antlrtree.txt b/grammar/testData/diagnostics/enum/equalityOfFlexibleTypeParameters.B.antlrtree.txt new file mode 100644 index 000000000..8a81ef8de --- /dev/null +++ b/grammar/testData/diagnostics/enum/equalityOfFlexibleTypeParameters.B.antlrtree.txt @@ -0,0 +1,191 @@ +File: equalityOfFlexibleTypeParameters.B.kt - c26f949cc05e2060ab7670f8f91e085a + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("K") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + simpleIdentifier + Identifier("mest") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("K") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyHelpers") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + RPAREN(")") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyHelpers") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/enum/referenceToEnumEntry.antlrtree.txt b/grammar/testData/diagnostics/enum/referenceToEnumEntry.antlrtree.txt new file mode 100644 index 000000000..1e92a21dd --- /dev/null +++ b/grammar/testData/diagnostics/enum/referenceToEnumEntry.antlrtree.txt @@ -0,0 +1,74 @@ +File: referenceToEnumEntry.kt - 34756dc2aa3528204a7aac14f2726ef5 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("My") + enumClassBody + LCURL("{") + enumEntries + enumEntry + simpleIdentifier + Identifier("V") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ref") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("My") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("V") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/equalityComparisonToSelf.antlrtree.txt b/grammar/testData/diagnostics/equalityComparisonToSelf.antlrtree.txt new file mode 100644 index 000000000..22e1218fe --- /dev/null +++ b/grammar/testData/diagnostics/equalityComparisonToSelf.antlrtree.txt @@ -0,0 +1,114 @@ +File: equalityComparisonToSelf.kt - d46e72109783519f139d5d909de9ccb8 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/equalityWithSmartCastInIfBlock.antlrtree.txt b/grammar/testData/diagnostics/equalityWithSmartCastInIfBlock.antlrtree.txt new file mode 100644 index 000000000..17c2ec6ed --- /dev/null +++ b/grammar/testData/diagnostics/equalityWithSmartCastInIfBlock.antlrtree.txt @@ -0,0 +1,223 @@ +File: equalityWithSmartCastInIfBlock.kt - b6b12734727483ad18a43aea3eb4a479 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + CONJ("&&") + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt new file mode 100644 index 000000000..c416bcdb8 --- /dev/null +++ b/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt @@ -0,0 +1,169 @@ +File: noContextReceiversOnValueClasses.kt - 1b33dfade05b2933952e3e49db73b161 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + fileAnnotation + AT_PRE_WS("\n@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INLINE_CLASS_DEPRECATED") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + Identifier("context") + LPAREN("(") + Identifier("A") + RPAREN(")") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("B1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + Identifier("context") + LPAREN("(") + Identifier("A") + RPAREN(")") + NL("\n") + Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("B2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + Identifier("context") + LPAREN("(") + Identifier("A") + RPAREN(")") + NL("\n") + Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt new file mode 100644 index 000000000..98d7ea381 --- /dev/null +++ b/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt @@ -0,0 +1,227 @@ +File: twoReceiverCandidatesError.kt - ef4f9891a2591e8b77f5af0d810c3b01 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + Identifier("context") + LPAREN("(") + Identifier("Int") + COMMA(",") + Identifier("Double") + RPAREN(")") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField.test.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField.test.antlrtree.txt new file mode 100644 index 000000000..b1c939bb7 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField.test.antlrtree.txt @@ -0,0 +1,598 @@ +File: derivedClassPropertyShadowsBaseClassField.test.kt - 158808c8153acb887ba8da7e3f893c79 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("regular") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("aa") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withGetter") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bb") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lateInit") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lazyProp") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("dd") + QUOTE_CLOSE(""") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("withSetter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("ee") + QUOTE_CLOSE(""") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("println") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("openProp") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("ff") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("regular") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("withGetter") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("lateInit") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("lazyProp") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("withSetter") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("openProp") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("withGetter") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Derived") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("withGetter") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField13.test.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField13.test.antlrtree.txt new file mode 100644 index 000000000..ef50c0302 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/derivedClassPropertyShadowsBaseClassField13.test.antlrtree.txt @@ -0,0 +1,476 @@ +File: derivedClassPropertyShadowsBaseClassField13.test.kt - 653ceb9152c076a31e4c9ac11c704b7b + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("aa") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bb") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("dd") + QUOTE_CLOSE(""") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("ee") + QUOTE_CLOSE(""") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("println") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("b") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("c") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("d") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("e") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType.Main.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType.Main.antlrtree.txt new file mode 100644 index 000000000..3ae99473a --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType.Main.antlrtree.txt @@ -0,0 +1,204 @@ +File: javaFieldKotlinPropertyDifferentType.Main.kt - f14d8a43f9aa2fd19b250ddbd0b20f02 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("something") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("extension") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("something") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("extension") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType2.Main.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType2.Main.antlrtree.txt new file mode 100644 index 000000000..6f12204b7 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyDifferentType2.Main.antlrtree.txt @@ -0,0 +1,102 @@ +File: javaFieldKotlinPropertyDifferentType2.Main.kt - 42f8bebe80b60bb38089952a28f130e0 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Rectangle") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("TimelineSliderUI") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BasicSliderUI") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("thumbRect") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Rectangle") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("thumbRect") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.B.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.B.antlrtree.txt new file mode 100644 index 000000000..e3e6e07a5 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.B.antlrtree.txt @@ -0,0 +1,76 @@ +File: javaFieldKotlinPropertyJavaFieldInPackagePrivate.B.kt - 6027a78e43fa2e1fe9f663fa91a11421 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("base") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("FAIL") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.test.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.test.antlrtree.txt new file mode 100644 index 000000000..46f60c848 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaFieldInPackagePrivate.test.antlrtree.txt @@ -0,0 +1,78 @@ +File: javaFieldKotlinPropertyJavaFieldInPackagePrivate.test.kt - 9c16b191caf60ba211c7f16e47e1910b + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("f") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.B.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.B.antlrtree.txt new file mode 100644 index 000000000..721f8a727 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.B.antlrtree.txt @@ -0,0 +1,76 @@ +File: javaFieldKotlinPropertyJavaPackagePrivateField.B.kt - 6027a78e43fa2e1fe9f663fa91a11421 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("base") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("FAIL") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.test.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.test.antlrtree.txt new file mode 100644 index 000000000..6ce9ba413 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaFieldKotlinPropertyJavaPackagePrivateField.test.antlrtree.txt @@ -0,0 +1,78 @@ +File: javaFieldKotlinPropertyJavaPackagePrivateField.test.kt - 9c16b191caf60ba211c7f16e47e1910b + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("f") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Base.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Base.antlrtree.txt new file mode 100644 index 000000000..634421ac0 --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Base.antlrtree.txt @@ -0,0 +1,217 @@ +File: javaProtectedFieldAndKotlinInvisiblePropertyReference.Base.kt - ad5865676c0d78fa9c12780390d5bce4 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("base") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("BaseKotlin") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Intermediate") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Intermediate") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("DerivedFromDerivedJava") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("DerivedJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Derived.antlrtree.txt b/grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Derived.antlrtree.txt new file mode 100644 index 000000000..3c0c6ecff --- /dev/null +++ b/grammar/testData/diagnostics/fieldRename/javaProtectedFieldAndKotlinInvisiblePropertyReference.Derived.antlrtree.txt @@ -0,0 +1,849 @@ +File: javaProtectedFieldAndKotlinInvisiblePropertyReference.Derived.kt - 77da87f7a262526429021c8af127e324 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("derived") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("base") + DOT(".") + simpleIdentifier + Identifier("BaseJava") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Intermediate") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("IntermediateWithoutField") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("IntermediatePublic") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Intermediate") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("b") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Alias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Intermediate") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DerivedAlias") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Alias") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("local") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("LocalIntermediate") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("LocalDerived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("LocalIntermediate") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DerivedWithoutBackingField") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("IntermediateWithoutField") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DerivedPublic") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("IntermediatePublic") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DirectlyDerived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseJava") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("a") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/finalSupertype.antlrtree.txt b/grammar/testData/diagnostics/finalSupertype.antlrtree.txt new file mode 100644 index 000000000..f71b3053b --- /dev/null +++ b/grammar/testData/diagnostics/finalSupertype.antlrtree.txt @@ -0,0 +1,52 @@ +File: finalSupertype.kt - 5a86de24a899cb3429f86b35651828f2 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("OOO") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Alias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("OOO") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Alias") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/funReturnsAny.antlrtree.txt b/grammar/testData/diagnostics/funReturnsAny.antlrtree.txt new file mode 100644 index 000000000..a6e190c6a --- /dev/null +++ b/grammar/testData/diagnostics/funReturnsAny.antlrtree.txt @@ -0,0 +1,52 @@ +File: funReturnsAny.kt - d5064c4ab2179dcb9ac8b59929bd5996 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("someFunction") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/functionLiterals/kt56138.antlrtree.txt b/grammar/testData/diagnostics/functionLiterals/kt56138.antlrtree.txt new file mode 100644 index 000000000..6db8e809f --- /dev/null +++ b/grammar/testData/diagnostics/functionLiterals/kt56138.antlrtree.txt @@ -0,0 +1,1122 @@ +File: kt56138.kt - 0cae61364362eeeae1cf868d66be0e4b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeLambda1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeLambda2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str2") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("this") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x2") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x3") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("x") + QUOTE_CLOSE(""") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeLambda2") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str2") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("this") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeLambda1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeLambda1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("x") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str2") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("this") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("str2") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("this") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x2") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x3") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("x") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("x") + QUOTE_CLOSE(""") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/generics/approximationOfInProjection.antlrtree.txt b/grammar/testData/diagnostics/generics/approximationOfInProjection.antlrtree.txt new file mode 100644 index 000000000..14bb67e14 --- /dev/null +++ b/grammar/testData/diagnostics/generics/approximationOfInProjection.antlrtree.txt @@ -0,0 +1,296 @@ +File: approximationOfInProjection.kt - c6464c9eafa98c1b5432bab48fc016ce + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Bound") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Bound") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Bound") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("vl") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Bound") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Bound") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("vl") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/generics/nullableTypeParameterScope.antlrtree.txt b/grammar/testData/diagnostics/generics/nullableTypeParameterScope.antlrtree.txt new file mode 100644 index 000000000..1742a27b0 --- /dev/null +++ b/grammar/testData/diagnostics/generics/nullableTypeParameterScope.antlrtree.txt @@ -0,0 +1,308 @@ +File: nullableTypeParameterScope.kt - df17a84e39864056a94b1e0baae4374b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ConverterFromString") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("ofS") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("nullable") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("nullText") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ConverterFromString") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ConverterFromString") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("ofS") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nullText") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@ConverterFromString") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ofS") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/generics/outerTypeParametersInNestedClasses.antlrtree.txt b/grammar/testData/diagnostics/generics/outerTypeParametersInNestedClasses.antlrtree.txt new file mode 100644 index 000000000..c17014345 --- /dev/null +++ b/grammar/testData/diagnostics/generics/outerTypeParametersInNestedClasses.antlrtree.txt @@ -0,0 +1,445 @@ +File: outerTypeParametersInNestedClasses.kt - 28c29f2091db4fe2337d0e477d045d5f + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("O") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Nested") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("InnerNested") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("E") + enumClassBody + LCURL("{") + NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("obj") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Local") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.test.antlrtree.txt b/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.test.antlrtree.txt new file mode 100644 index 000000000..68d2a4a16 --- /dev/null +++ b/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.test.antlrtree.txt @@ -0,0 +1,483 @@ +File: setterProjectedOutAssign.test.kt - 9fb4ff4eb8059db01fc4767da2dc56aa + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Tr") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Tr") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaClass") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentNameComplex.antlrtree.txt b/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentNameComplex.antlrtree.txt new file mode 100644 index 000000000..5548f84eb --- /dev/null +++ b/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentNameComplex.antlrtree.txt @@ -0,0 +1,415 @@ +File: ImportFromCurrentWithDifferentNameComplex.kt - 4d90bc950c2e501ed013f6ae870fa192 + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("a") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("A") + importAlias + AS("as") + simpleIdentifier + Identifier("ER") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("x") + importAlias + AS("as") + simpleIdentifier + Identifier("y") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("foo") + importAlias + AS("as") + simpleIdentifier + Identifier("bar") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ER") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ER") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/imports/brokenImport.Klass.antlrtree.txt b/grammar/testData/diagnostics/imports/brokenImport.Klass.antlrtree.txt new file mode 100644 index 000000000..88e374f24 --- /dev/null +++ b/grammar/testData/diagnostics/imports/brokenImport.Klass.antlrtree.txt @@ -0,0 +1,173 @@ +File: brokenImport.Klass.kt - 3ee8a32b368aa884d42059b0d977d34f + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pkg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("Klass") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Bar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + objectDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + OBJECT("object") + simpleIdentifier + Identifier("Bar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("Foo3") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + objectDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + OBJECT("object") + simpleIdentifier + Identifier("Bar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/imports/brokenImport.test.antlrtree.txt b/grammar/testData/diagnostics/imports/brokenImport.test.antlrtree.txt new file mode 100644 index 000000000..8aed09bd4 --- /dev/null +++ b/grammar/testData/diagnostics/imports/brokenImport.test.antlrtree.txt @@ -0,0 +1,114 @@ +File: brokenImport.test.kt - 8a47264aff4e7f1dce2b630feb9a5a30 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pack") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("bar") + DOT(".") + simpleIdentifier + Identifier("baz") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("Outer") + DOT(".") + simpleIdentifier + Identifier("``") + DOT(".") + simpleIdentifier + Identifier("getInner") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pack") + DOT(".") + simpleIdentifier + Identifier("UnresolvedName") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("Klass") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("Foo") + DOT(".") + simpleIdentifier + Identifier("Bar") + DOT(".") + simpleIdentifier + Identifier("baz") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("Foo2") + DOT(".") + simpleIdentifier + Identifier("Bar") + DOT(".") + simpleIdentifier + Identifier("baz") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("Foo3") + DOT(".") + simpleIdentifier + Identifier("Bar") + DOT(".") + simpleIdentifier + Identifier("baz") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MainSource") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/imports/renamedImportInDifferentFile.first.antlrtree.txt b/grammar/testData/diagnostics/imports/renamedImportInDifferentFile.first.antlrtree.txt new file mode 100644 index 000000000..fb394bfd9 --- /dev/null +++ b/grammar/testData/diagnostics/imports/renamedImportInDifferentFile.first.antlrtree.txt @@ -0,0 +1,53 @@ +File: renamedImportInDifferentFile.first.kt - 753a5d1cf667e11837d6cbbe9bb59054 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("b") + semi + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("b") + DOT(".") + simpleIdentifier + Identifier("DependencyAnalyzerDependency") + importAlias + AS("as") + simpleIdentifier + Identifier("Dependency") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Dependency") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/imports/renamedImportInDifferentFile.main.antlrtree.txt b/grammar/testData/diagnostics/imports/renamedImportInDifferentFile.main.antlrtree.txt new file mode 100644 index 000000000..f0f9fb425 --- /dev/null +++ b/grammar/testData/diagnostics/imports/renamedImportInDifferentFile.main.antlrtree.txt @@ -0,0 +1,134 @@ +File: renamedImportInDifferentFile.main.kt - 29c5750efe42f0c0d58d538d897b3634 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("b") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("A") + semi + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("DependencyAnalyzerDependency") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("parent") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DependencyAnalyzerDependency") + quest + QUEST_WS("? ") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DependencyAnalyzerDependency") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt b/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt new file mode 100644 index 000000000..6dde5f8b8 --- /dev/null +++ b/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt @@ -0,0 +1,56 @@ +File: kt59041.kt - c760b6913d1fae9c44206ea7b67da696 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("list") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mutable") + Identifier("ListOf") + LANGLE("<") + Identifier("Int") + RANGLE(">") + LPAREN("(") + IntegerLiteral("1") + RPAREN(")") + LCURL("{") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/incrementDecrementOnFullyQualified.antlrtree.txt b/grammar/testData/diagnostics/incrementDecrementOnFullyQualified.antlrtree.txt new file mode 100644 index 000000000..658a79730 --- /dev/null +++ b/grammar/testData/diagnostics/incrementDecrementOnFullyQualified.antlrtree.txt @@ -0,0 +1,98 @@ +File: incrementDecrementOnFullyQualified.kt - 028d2f5e9827514d6cc708587a15de93 + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("bar") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("baz") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + postfixUnaryOperator + INCR("++") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/incrementDecrementOnObject.antlrtree.txt b/grammar/testData/diagnostics/incrementDecrementOnObject.antlrtree.txt new file mode 100644 index 000000000..62dbb1b47 --- /dev/null +++ b/grammar/testData/diagnostics/incrementDecrementOnObject.antlrtree.txt @@ -0,0 +1,293 @@ +File: incrementDecrementOnObject.kt - 4b7fcb7f6e6d0861742f45cd47fc302e + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("AAA") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("inc") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AAA") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AAA") + postfixUnarySuffix + postfixUnaryOperator + INCR("++") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + INCR("++") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AAA") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AAA") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AAA") + postfixUnarySuffix + postfixUnaryOperator + INCR("++") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AAA") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + INCR("++") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AAA") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/builderInference/incompleteCallInReturnArgumentsWithProperExpectType.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/incompleteCallInReturnArgumentsWithProperExpectType.antlrtree.txt new file mode 100644 index 000000000..749b17397 --- /dev/null +++ b/grammar/testData/diagnostics/inference/builderInference/incompleteCallInReturnArgumentsWithProperExpectType.antlrtree.txt @@ -0,0 +1,1055 @@ +File: incompleteCallInReturnArgumentsWithProperExpectType.kt - 65a5ef0f027020e5773925287dad90af + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("buildBoxUnit") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Out") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("makeOut") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mat") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("buildBoxProperType") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Out") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("makeOut") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mat") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Out") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("V") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Box") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("boxed") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + SET("set") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("newValue") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("boxed") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("newValue") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + simpleIdentifier + Identifier("buildBoxUnit") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fill") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Box") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("also") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fill") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + simpleIdentifier + Identifier("buildBoxProperType") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fill") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Box") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("also") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fill") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("S") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("M") + RANGLE(">") + simpleIdentifier + Identifier("makeOut") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + RANGLE(">") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("M") + RANGLE(">") + simpleIdentifier + Identifier("mat") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/callableReferences/conversionLastStatementInLambda.antlrtree.txt b/grammar/testData/diagnostics/inference/callableReferences/conversionLastStatementInLambda.antlrtree.txt new file mode 100644 index 000000000..de238e6bf --- /dev/null +++ b/grammar/testData/diagnostics/inference/callableReferences/conversionLastStatementInLambda.antlrtree.txt @@ -0,0 +1,530 @@ +File: conversionLastStatementInLambda.kt - 196cb0d0c6745c120ae0dbb220b24f8a + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callWithLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("test1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callWithLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("test1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("test2") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callWithLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("test1") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("test2") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callWithLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("test1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("callWithLambda") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("action") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/callableReferences/kt55931.antlrtree.txt b/grammar/testData/diagnostics/inference/callableReferences/kt55931.antlrtree.txt new file mode 100644 index 000000000..fd102eaf1 --- /dev/null +++ b/grammar/testData/diagnostics/inference/callableReferences/kt55931.antlrtree.txt @@ -0,0 +1,686 @@ +File: kt55931.kt - 552731922eb224a277a85d70217c2763 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("fun1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("fun2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeLambda") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("lambda") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun1") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun2") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun2") + NL("\n") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun1") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun2") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("w") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun2") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x5") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun1") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("fun2") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/callableReferences/kt56227.antlrtree.txt b/grammar/testData/diagnostics/inference/callableReferences/kt56227.antlrtree.txt new file mode 100644 index 000000000..5e5dbe6e8 --- /dev/null +++ b/grammar/testData/diagnostics/inference/callableReferences/kt56227.antlrtree.txt @@ -0,0 +1,582 @@ +File: kt56227.kt - 40166ee2994bec8624e4efad7c8009d9 + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty0") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("MyPattern") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("conservation") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("awake") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("brainwt") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + quest + QUEST_NO_WS("?") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("bodywt") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Iterable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("ggplot4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty0") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty0") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("map") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RPAREN(")") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RPAREN(")") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("map") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("do something meaningful") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOf") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPattern") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ggplot4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("conservation") + RCURL("}") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("bodywt") + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/capturedTypes/approximationLeavesNonTrivialLowerBound.antlrtree.txt b/grammar/testData/diagnostics/inference/capturedTypes/approximationLeavesNonTrivialLowerBound.antlrtree.txt new file mode 100644 index 000000000..490fff957 --- /dev/null +++ b/grammar/testData/diagnostics/inference/capturedTypes/approximationLeavesNonTrivialLowerBound.antlrtree.txt @@ -0,0 +1,474 @@ +File: approximationLeavesNonTrivialLowerBound.kt - eb131d8f1f87428e5bff0ac3b49ef79d + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Inv") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + simpleIdentifier + Identifier("id") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScope.antlrtree.txt b/grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScope.antlrtree.txt new file mode 100644 index 000000000..668cb9a01 --- /dev/null +++ b/grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScope.antlrtree.txt @@ -0,0 +1,226 @@ +File: captureFromNullableTypeInScope.kt - 7462b1db064454c5596d916262c37d13 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ListVM") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("currentItem1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableProperty") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ListItemVM") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + quest + QUEST_NO_WS("?") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("currentItem") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MutableProperty") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ListItemVM") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("TItem") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("TItem") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ListVM") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("TItemVM") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ListItemVM") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("currentItem") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("TItemVM") + quest + QUEST_NO_WS("?") + RANGLE(">") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScopeAny.antlrtree.txt b/grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScopeAny.antlrtree.txt new file mode 100644 index 000000000..70ae14961 --- /dev/null +++ b/grammar/testData/diagnostics/inference/capturedTypes/captureFromNullableTypeInScopeAny.antlrtree.txt @@ -0,0 +1,170 @@ +File: captureFromNullableTypeInScopeAny.kt - c9122a45deb80cc0b8e98dd4e14bac1f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ListVM") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("currentItem1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableProperty") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("currentItem") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MutableProperty") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ListVM") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("TItemVM") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("currentItem") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableProperty") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("TItemVM") + quest + QUEST_NO_WS("?") + RANGLE(">") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/capturedTypes/differentCapturedTypes.antlrtree.txt b/grammar/testData/diagnostics/inference/capturedTypes/differentCapturedTypes.antlrtree.txt new file mode 100644 index 000000000..31d4fede6 --- /dev/null +++ b/grammar/testData/diagnostics/inference/capturedTypes/differentCapturedTypes.antlrtree.txt @@ -0,0 +1,287 @@ +File: differentCapturedTypes.kt - 48f8f82ec969a186d17c18cff036dfaa + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("myE") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Out") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myE") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/coercionToUnit/afterBareReturn.antlrtree.txt b/grammar/testData/diagnostics/inference/coercionToUnit/afterBareReturn.antlrtree.txt new file mode 100644 index 000000000..5e9f23012 --- /dev/null +++ b/grammar/testData/diagnostics/inference/coercionToUnit/afterBareReturn.antlrtree.txt @@ -0,0 +1,1028 @@ +File: afterBareReturn.kt - 90a92f58a15242440b16e661d8160e7e + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("completed") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("incomplete") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("incompatibleI") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + simpleIdentifier + Identifier("incompatibleC") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("p") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("expectUnit") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@run") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("completed") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@run") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("incomplete") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@run") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("incompatibleI") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@run") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("incompatibleC") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectUnit") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectUnit") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectUnit") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectUnit") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/coercionToUnit/nestedLambda.antlrtree.txt b/grammar/testData/diagnostics/inference/coercionToUnit/nestedLambda.antlrtree.txt new file mode 100644 index 000000000..86c9be7e1 --- /dev/null +++ b/grammar/testData/diagnostics/inference/coercionToUnit/nestedLambda.antlrtree.txt @@ -0,0 +1,377 @@ +File: nestedLambda.kt - 2d44820ff48337a20f09f690581c95fc + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Context") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("proceed") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("K") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("process") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Context") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("processNested") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("body") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("body") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("pipeline") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pipeline") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("process") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@process") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("processNested") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("proceed") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/elvisInsideWhen.antlrtree.txt b/grammar/testData/diagnostics/inference/elvisInsideWhen.antlrtree.txt new file mode 100644 index 000000000..81358e7f0 --- /dev/null +++ b/grammar/testData/diagnostics/inference/elvisInsideWhen.antlrtree.txt @@ -0,0 +1,492 @@ +File: elvisInsideWhen.kt - fdad49ef0b77ac15e54718b99699f41c + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("myOut") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Out") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("oNullable") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + comparisonOperator + RANGLE(">") + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o") + semi + NL("\n") + NL("\n") + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("oNullable") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myOut") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myOut") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/emptyIntersectionOnIf.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/emptyIntersectionOnIf.antlrtree.txt new file mode 100644 index 000000000..5b7525b7e --- /dev/null +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/emptyIntersectionOnIf.antlrtree.txt @@ -0,0 +1,166 @@ +File: emptyIntersectionOnIf.kt - a06c829b511a2c8c7527f5b395c853c5 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("current") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + NL("\n") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("current") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("current") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt54411.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt54411.antlrtree.txt new file mode 100644 index 000000000..7141d8e8f --- /dev/null +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt54411.antlrtree.txt @@ -0,0 +1,449 @@ +File: kt54411.kt - c2865905317f0cc45267c64059b60fc6 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("AtomicRef") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Segment") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AtomicRef") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("findSegmentAndMoveForward") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("createNewSegment") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + parameter + simpleIdentifier + Identifier("prev") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + quest + QUEST_NO_WS("?") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Queue") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Q") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("tail") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AtomicRef") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("OneElementSegment") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Q") + RANGLE(">") + RANGLE(">") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("enqueue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Q") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("tail") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("findSegmentAndMoveForward") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("createSegment") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("C") + RANGLE(">") + simpleIdentifier + Identifier("createSegment") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("prev") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("OneElementSegment") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("OneElementSegment") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("OneElementSegment") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("O") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Segment") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("OneElementSegment") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("O") + RANGLE(">") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Segment") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("S") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Segment") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/exclExclInference.antlrtree.txt b/grammar/testData/diagnostics/inference/exclExclInference.antlrtree.txt new file mode 100644 index 000000000..1c63a2f30 --- /dev/null +++ b/grammar/testData/diagnostics/inference/exclExclInference.antlrtree.txt @@ -0,0 +1,357 @@ +File: exclExclInference.kt - 4c42065270dca63ba84500f86616e3d9 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_WS("! ") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("materialize") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/forks/nestedCallVariableFixation.main.antlrtree.txt b/grammar/testData/diagnostics/inference/forks/nestedCallVariableFixation.main.antlrtree.txt new file mode 100644 index 000000000..10e6c3d54 --- /dev/null +++ b/grammar/testData/diagnostics/inference/forks/nestedCallVariableFixation.main.antlrtree.txt @@ -0,0 +1,252 @@ +File: nestedCallVariableFixation.main.kt - 89bcf2b0162ccf2fccec51ada06719bc + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("comparisonStrings") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("hashMapOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PyTokenTypes") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("LT") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("<") + QUOTE_CLOSE(""") + COMMA(",") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("findComparisonNegationOperators") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("PyTokenTypes") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Pair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("comparisonStrings") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + simpleIdentifier + Identifier("to") + NL("\n") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("comparisonStrings") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/forks/nestedCallVariableFixationSimple.antlrtree.txt b/grammar/testData/diagnostics/inference/forks/nestedCallVariableFixationSimple.antlrtree.txt new file mode 100644 index 000000000..84ad29eef --- /dev/null +++ b/grammar/testData/diagnostics/inference/forks/nestedCallVariableFixationSimple.antlrtree.txt @@ -0,0 +1,850 @@ +File: nestedCallVariableFixationSimple.kt - fe4c39a3a298e05fe515a26e7e6b44eb + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Generic") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("Y") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Generic") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MyPair") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("B") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + classParameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Generic") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Generic") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + CONJ("&&") + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyPair") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyPair") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyPair") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/forks/overloadResolutionByLambdaReturnTypeAndExpectedType.antlrtree.txt b/grammar/testData/diagnostics/inference/forks/overloadResolutionByLambdaReturnTypeAndExpectedType.antlrtree.txt new file mode 100644 index 000000000..a37b4e7e8 --- /dev/null +++ b/grammar/testData/diagnostics/inference/forks/overloadResolutionByLambdaReturnTypeAndExpectedType.antlrtree.txt @@ -0,0 +1,1127 @@ +File: overloadResolutionByLambdaReturnTypeAndExpectedType.kt - bdb26e0131b9c8e638a2cfcc2c0ebf56 + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("experimental") + DOT(".") + simpleIdentifier + Identifier("ExperimentalTypeInference") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MyList") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MySequence") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("myListOf") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("m") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("noOverloadResolutionByLambdaReturnType") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myListOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("noOverloadResolutionByLambdaReturnType") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myListOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("limitedFlatMap") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myListOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("limitedFlatMap") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myListOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("noOverloadResolutionByLambdaReturnType") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("producer") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("limitedFlatMap") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("producer") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalTypeInference") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("OverloadResolutionByLambdaReturnType") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("jvm") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("JvmName") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("limitedFlatMapSeq") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("limitedFlatMap") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("producer") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MySequence") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/genericCallInThrow.antlrtree.txt b/grammar/testData/diagnostics/inference/genericCallInThrow.antlrtree.txt new file mode 100644 index 000000000..24613ac2b --- /dev/null +++ b/grammar/testData/diagnostics/inference/genericCallInThrow.antlrtree.txt @@ -0,0 +1,111 @@ +File: genericCallInThrow.kt - c9b192355f4a6a5b75cdf3cc7e1ccd62 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + EOF("") diff --git a/grammar/testData/diagnostics/inference/ifWithDependentBranches.antlrtree.txt b/grammar/testData/diagnostics/inference/ifWithDependentBranches.antlrtree.txt new file mode 100644 index 000000000..7e7f79d1c --- /dev/null +++ b/grammar/testData/diagnostics/inference/ifWithDependentBranches.antlrtree.txt @@ -0,0 +1,1784 @@ +File: ifWithDependentBranches.kt - 89246705dfbcf2e41b90bda57da06989 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Additional") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Additional") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("U") + RANGLE(">") + simpleIdentifier + Identifier("aOf") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("U") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("convert") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Additional") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Additional") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo5") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo6") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Additional") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo7") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo8") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Additional") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("aOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("convert") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/inferenceForkRegression.antlrtree.txt b/grammar/testData/diagnostics/inference/inferenceForkRegression.antlrtree.txt new file mode 100644 index 000000000..d37e19349 --- /dev/null +++ b/grammar/testData/diagnostics/inference/inferenceForkRegression.antlrtree.txt @@ -0,0 +1,254 @@ +File: inferenceForkRegression.kt - aa0ab4771d941e4f854b1ca47f8a29c8 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("util") + DOT(".") + simpleIdentifier + Identifier("concurrent") + DOT(".") + simpleIdentifier + Identifier("ConcurrentHashMap") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ModificationData") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("updatedFiles") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ConcurrentHashMap") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ModificationData") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("updatedFilesSnapshot") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("HashMap") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("updatedFiles") + RPAREN(")") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("updatedFilesSnapshot") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("flatMap") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/inferenceForkRegressionSimple.antlrtree.txt b/grammar/testData/diagnostics/inference/inferenceForkRegressionSimple.antlrtree.txt new file mode 100644 index 000000000..6520f7ea5 --- /dev/null +++ b/grammar/testData/diagnostics/inference/inferenceForkRegressionSimple.antlrtree.txt @@ -0,0 +1,270 @@ +File: inferenceForkRegressionSimple.kt - 2e73cdd64c101252baae35e1bf317a72 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MutableMap") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("m") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableMap") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("flatMap") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/nothingType/kt56448.main.antlrtree.txt b/grammar/testData/diagnostics/inference/nothingType/kt56448.main.antlrtree.txt new file mode 100644 index 000000000..46917a785 --- /dev/null +++ b/grammar/testData/diagnostics/inference/nothingType/kt56448.main.antlrtree.txt @@ -0,0 +1,847 @@ +File: kt56448.main.kt - 614812f9ffca9c992de3f9095db21f17 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty1") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("XdEntity") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("XdIssue") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("XdEntity") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("isRemoved") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("votes") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("getNullableIssue") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdIssue") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdEntity") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + DOT(".") + simpleIdentifier + Identifier("toXd") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdIssue") + DOT(".") + simpleIdentifier + Identifier("duplicatesRootSearch") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdIssue") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdEntity") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + quest + QUEST_NO_WS("?") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + simpleIdentifier + Identifier("getOldValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("updateVotesForDuplicates") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("issue") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdIssue") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("toRecount") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("HashSet") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XdIssue") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("oldDup") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("getNullableIssue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("oldDup") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("oldDup") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeJavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toXd") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("_") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Exception") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("newDup") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("getNullableIssue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("oldDup") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + CONJ("&&") + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + excl + EXCL_NO_WS("!") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("oldDup") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("isRemoved") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("toRecount") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("add") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("oldDup") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("duplicatesRootSearch") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/nothingType/returnAsLastStatementInLambda.antlrtree.txt b/grammar/testData/diagnostics/inference/nothingType/returnAsLastStatementInLambda.antlrtree.txt new file mode 100644 index 000000000..e40046c41 --- /dev/null +++ b/grammar/testData/diagnostics/inference/nothingType/returnAsLastStatementInLambda.antlrtree.txt @@ -0,0 +1,718 @@ +File: returnAsLastStatementInLambda.kt - f1faf3095313b834efb75ff5b3ae0a17 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("U") + RANGLE(">") + simpleIdentifier + Identifier("myRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("calc") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("U") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("U") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("calc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dates1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@myRun") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("buildList") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("add") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dates1") + semis + NL("\n") + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dates2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@myRun") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("buildList") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("add") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@myRun") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("buildList") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("add") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("dates2") + semis + NL("\n") + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("dates3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@myRun") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("buildList") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("add") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/nothingType/selectWithNull.antlrtree.txt b/grammar/testData/diagnostics/inference/nothingType/selectWithNull.antlrtree.txt new file mode 100644 index 000000000..1c4bcced4 --- /dev/null +++ b/grammar/testData/diagnostics/inference/nothingType/selectWithNull.antlrtree.txt @@ -0,0 +1,301 @@ +File: selectWithNull.kt - 9d87bd9dcec9d95d65047fecffc8b158 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("materialize") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("S") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + NL("\n") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/nothingVsParameterBound.antlrtree.txt b/grammar/testData/diagnostics/inference/nothingVsParameterBound.antlrtree.txt new file mode 100644 index 000000000..0c70bc409 --- /dev/null +++ b/grammar/testData/diagnostics/inference/nothingVsParameterBound.antlrtree.txt @@ -0,0 +1,210 @@ +File: nothingVsParameterBound.kt - 482a5f89ceaa084f053fb82043429ba9 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Out") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + quest + QUEST_NO_WS("?") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Out") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/nullableArgumentForDnn.antlrtree.txt b/grammar/testData/diagnostics/inference/nullableArgumentForDnn.antlrtree.txt new file mode 100644 index 000000000..70b82cae6 --- /dev/null +++ b/grammar/testData/diagnostics/inference/nullableArgumentForDnn.antlrtree.txt @@ -0,0 +1,250 @@ +File: nullableArgumentForDnn.kt - 77f9a12dd47fa92414fc804cb0ac76e5 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("r") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("r") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("W") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + definitelyNonNullableType + userType + simpleUserType + simpleIdentifier + Identifier("W") + AMP("&") + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/inference/receiverTypeMismatch_withProper.Main.antlrtree.txt b/grammar/testData/diagnostics/inference/receiverTypeMismatch_withProper.Main.antlrtree.txt new file mode 100644 index 000000000..ef881f248 --- /dev/null +++ b/grammar/testData/diagnostics/inference/receiverTypeMismatch_withProper.Main.antlrtree.txt @@ -0,0 +1,93 @@ +File: receiverTypeMismatch_withProper.Main.kt - f14308ad927cf2d64293749ae9339870 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("setup") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("configuration") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Configuration") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("configuration") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("apply") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("directoryPath") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/receiverTypeMismatch_withoutProper.Main.antlrtree.txt b/grammar/testData/diagnostics/inference/receiverTypeMismatch_withoutProper.Main.antlrtree.txt new file mode 100644 index 000000000..66429520f --- /dev/null +++ b/grammar/testData/diagnostics/inference/receiverTypeMismatch_withoutProper.Main.antlrtree.txt @@ -0,0 +1,93 @@ +File: receiverTypeMismatch_withoutProper.Main.kt - f14308ad927cf2d64293749ae9339870 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("setup") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("configuration") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Configuration") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("configuration") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("apply") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("directoryPath") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/recursiveCalls/kt23531.reversed.antlrtree.txt b/grammar/testData/diagnostics/inference/recursiveCalls/kt23531.reversed.antlrtree.txt new file mode 100644 index 000000000..a04fad097 --- /dev/null +++ b/grammar/testData/diagnostics/inference/recursiveCalls/kt23531.reversed.antlrtree.txt @@ -0,0 +1,623 @@ +File: kt23531.reversed.kt - 5af934b8918e3f8e62e430b342ff1b7d + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Scope") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("simpleAsync0") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Scope") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("simpleAsync1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + typeModifiers + typeModifier + SUSPEND("suspend") + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Scope") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("simpleAsync2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Scope") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("simpleAsync3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + typeModifiers + typeModifier + SUSPEND("suspend") + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Scope") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("insideJob0") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("doTheJob0") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("insideJob1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("doTheJob1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("insideJob2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("doTheJob2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("insideJob3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("doTheJob3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("doTheJob0") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("simpleAsync0") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("insideJob0") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("doTheJob1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("simpleAsync1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("insideJob1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("doTheJob2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("simpleAsync2") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("insideJob2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("doTheJob3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("simpleAsync3") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("insideJob3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/smartCastForkForExpectType.antlrtree.txt b/grammar/testData/diagnostics/inference/smartCastForkForExpectType.antlrtree.txt new file mode 100644 index 000000000..4b1119180 --- /dev/null +++ b/grammar/testData/diagnostics/inference/smartCastForkForExpectType.antlrtree.txt @@ -0,0 +1,796 @@ +File: smartCastForkForExpectType.kt - 784e4d99cc7a5759cbefe7fd005c15b4 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Slice") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("SL0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("SL1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("SL2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SL0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SL1") + DISJ("||") + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SL2") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Y") + RANGLE(">") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inference/smartCastForkForExpectedTypeNested.antlrtree.txt b/grammar/testData/diagnostics/inference/smartCastForkForExpectedTypeNested.antlrtree.txt new file mode 100644 index 000000000..babcbd88d --- /dev/null +++ b/grammar/testData/diagnostics/inference/smartCastForkForExpectedTypeNested.antlrtree.txt @@ -0,0 +1,924 @@ +File: smartCastForkForExpectedTypeNested.kt - 080a42e3cc8aea6433c34d7c04b37c1b + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Slice") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("SL0") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("SL1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("SL2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SL0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SL1") + DISJ("||") + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQEQ("===") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SL2") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("id") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Y") + RANGLE(">") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Slice") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Y") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/kt55179.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/kt55179.antlrtree.txt new file mode 100644 index 000000000..3ff4437f4 --- /dev/null +++ b/grammar/testData/diagnostics/inline/nonPublicMember/kt55179.antlrtree.txt @@ -0,0 +1,256 @@ +File: kt55179.kt - 315265b574fc80f66b9fdf966c020ce7 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("buildFoo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Nested") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("buildFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Companion") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Nested") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/protectedInlineInsideInternal.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/protectedInlineInsideInternal.antlrtree.txt new file mode 100644 index 000000000..76833911b --- /dev/null +++ b/grammar/testData/diagnostics/inline/nonPublicMember/protectedInlineInsideInternal.antlrtree.txt @@ -0,0 +1,148 @@ +File: protectedInlineInsideInternal.kt - 05badb5e9b9768b61064ee0b498190d1 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("context") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Bar") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + visibilityModifier + PROTECTED("protected") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + functionModifier + INLINE("inline") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("inlineContext") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("context") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inline/recursiveTypeInPrivateInlineFunction.antlrtree.txt b/grammar/testData/diagnostics/inline/recursiveTypeInPrivateInlineFunction.antlrtree.txt new file mode 100644 index 000000000..0181654af --- /dev/null +++ b/grammar/testData/diagnostics/inline/recursiveTypeInPrivateInlineFunction.antlrtree.txt @@ -0,0 +1,92 @@ +File: recursiveTypeInPrivateInlineFunction.kt - c554200fc114721f9f783f8af610a3df + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("check") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("inf") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inf") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Self") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Self") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inline/returnedAnonymousObjects_2.antlrtree.txt b/grammar/testData/diagnostics/inline/returnedAnonymousObjects_2.antlrtree.txt new file mode 100644 index 000000000..3ea8c2ed9 --- /dev/null +++ b/grammar/testData/diagnostics/inline/returnedAnonymousObjects_2.antlrtree.txt @@ -0,0 +1,4396 @@ +File: returnedAnonymousObjects_2.kt - 9c1b03b2c84b0467f220cf9c9a9888d6 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Inv") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo10") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo11") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo12") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo20") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo21") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo22") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo30") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo31") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo32") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + CROSSINLINE("crossinline") + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("foo40") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("foo41") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("foo42") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inv") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test10") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo10") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo10") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test11") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo11") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo11") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test12") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo12") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo12") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test20") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo20") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo20") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test21") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo21") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo21") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test22") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo22") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo22") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test30") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo30") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo30") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test31") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo31") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo31") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test32") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo32") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo32") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test40") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo40") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo40") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test41") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo41") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo41") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test42") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo42") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo42") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inline/valueClasses.antlrtree.txt b/grammar/testData/diagnostics/inline/valueClasses.antlrtree.txt new file mode 100644 index 000000000..687258dfb --- /dev/null +++ b/grammar/testData/diagnostics/inline/valueClasses.antlrtree.txt @@ -0,0 +1,253 @@ +File: valueClasses.kt - c06475e8a453fc45d411b3cf5a6da701 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("DPoint") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("f1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("DPoint") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("f2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + UnsignedLiteral("2U") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("p1") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("DPoint") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inline/virtualValInEnum.antlrtree.txt b/grammar/testData/diagnostics/inline/virtualValInEnum.antlrtree.txt new file mode 100644 index 000000000..ec4594927 --- /dev/null +++ b/grammar/testData/diagnostics/inline/virtualValInEnum.antlrtree.txt @@ -0,0 +1,228 @@ +File: virtualValInEnum.kt - 7c3efe6789b2be807c3796116ab677e4 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("B2") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo1") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar1") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + NL("\n") + getter + modifiers + modifier + functionModifier + INLINE("inline") + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + functionModifier + INLINE("inline") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar1") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/inefficientEqualsOverridingInInlineClass.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/inefficientEqualsOverridingInInlineClass.antlrtree.txt new file mode 100644 index 000000000..ef80ce5c3 --- /dev/null +++ b/grammar/testData/diagnostics/inlineClasses/inefficientEqualsOverridingInInlineClass.antlrtree.txt @@ -0,0 +1,680 @@ +File: inefficientEqualsOverridingInInlineClass.kt - d1416e855bfdd3045ecd62db8ec34832 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + isOperator + NOT_IS("!is ") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC4") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOff.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOff.antlrtree.txt new file mode 100644 index 000000000..fb1baf4bf --- /dev/null +++ b/grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOff.antlrtree.txt @@ -0,0 +1,90 @@ +File: lateinitInlineClassesOff.kt - bdb7449969e73d0167efdaaeb0b6c301 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOn.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOn.antlrtree.txt new file mode 100644 index 000000000..caadc892c --- /dev/null +++ b/grammar/testData/diagnostics/inlineClasses/lateinitInlineClassesOn.antlrtree.txt @@ -0,0 +1,1380 @@ +File: lateinitInlineClassesOn.kt - e8a67a0e625f6b2dc2c6bf7cf9f5e4f1 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC5") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC6") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC7") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC8") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC9") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC9") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC8") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC10") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC11") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("g") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC5") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("h") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RANGLE(">") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC8") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC10") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("o") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + quest + QUEST_NO_WS("?") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("m") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("UInt") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("n") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC11") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("g") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC5") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("h") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RANGLE(">") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC8") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC10") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("o") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + quest + QUEST_NO_WS("?") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("m") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("UInt") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("n") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC11") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC2") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("g") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC5") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("h") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RANGLE(">") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC8") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC10") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("o") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("m") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("UInt") + semis + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("n") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC11") + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/reservedConstructorsBodyInKotlinPre19.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/reservedConstructorsBodyInKotlinPre19.antlrtree.txt new file mode 100644 index 000000000..9336b2de3 --- /dev/null +++ b/grammar/testData/diagnostics/inlineClasses/reservedConstructorsBodyInKotlinPre19.antlrtree.txt @@ -0,0 +1,152 @@ +File: reservedConstructorsBodyInKotlinPre19.kt - cbb8e7e6bb5c2f45569eb28a3c64d5c5 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("println") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorDeclarationCheck.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorDeclarationCheck.antlrtree.txt new file mode 100644 index 000000000..7b5bf2566 --- /dev/null +++ b/grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorDeclarationCheck.antlrtree.txt @@ -0,0 +1,945 @@ +File: typedEqualsOperatorDeclarationCheck.kt - 8f1e0ffb6f61e6e21b6728d0e2c00a06 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC2") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC3") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC4") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC4") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC5") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC6") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("S1") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("S2") + RANGLE(">") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC7") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC8") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC8") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorModifierInInlineClass.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorModifierInInlineClass.antlrtree.txt new file mode 100644 index 000000000..b75a178ed --- /dev/null +++ b/grammar/testData/diagnostics/inlineClasses/typedEqualsOperatorModifierInInlineClass.antlrtree.txt @@ -0,0 +1,303 @@ +File: typedEqualsOperatorModifierInInlineClass.kt - ecc0c99d500d3034360526d1a404609a + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC1") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC2") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inlineDeprecationsOnImplicitCalls.antlrtree.txt b/grammar/testData/diagnostics/inlineDeprecationsOnImplicitCalls.antlrtree.txt new file mode 100644 index 000000000..d0bfb695f --- /dev/null +++ b/grammar/testData/diagnostics/inlineDeprecationsOnImplicitCalls.antlrtree.txt @@ -0,0 +1,648 @@ +File: inlineDeprecationsOnImplicitCalls.kt - cef51318e7f03f75fd3197c8971fbe97 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("PublishedApi") + NL("\n") + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + primaryConstructor + modifiers + modifier + visibilityModifier + PRIVATE("private") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + functionModifier + INLINE("inline") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + functionModifier + INLINE("inline") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("PrivateClass") + primaryConstructor + modifiers + modifier + visibilityModifier + PUBLIC("public") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("OpenClass") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("PublishedApi") + NL("\n") + modifier + visibilityModifier + INTERNAL("internal") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("InternalClassProtectedConstructor") + primaryConstructor + modifiers + modifier + visibilityModifier + PROTECTED("protected") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + functionModifier + INLINE("inline") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("InternalClassProtectedConstructor") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InternalClassProtectedConstructor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("publicInline") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InternalClassPrivateConstructor") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InternalClassProtectedConstructor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("internalInline") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("pc") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PrivateClass") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/inner/nestedClassTypeParameterNameCollision.antlrtree.txt b/grammar/testData/diagnostics/inner/nestedClassTypeParameterNameCollision.antlrtree.txt new file mode 100644 index 000000000..aaa82fc84 --- /dev/null +++ b/grammar/testData/diagnostics/inner/nestedClassTypeParameterNameCollision.antlrtree.txt @@ -0,0 +1,207 @@ +File: nestedClassTypeParameterNameCollision.kt - 0c0e98552029c01580eac1266a3f874b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("Result") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("String") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Success") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Result") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Failure") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("cause") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Throwable") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Result") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Result") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Result") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Success") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/integerLiterals/complexMapping.complexMapping.antlrtree.txt b/grammar/testData/diagnostics/integerLiterals/complexMapping.complexMapping.antlrtree.txt new file mode 100644 index 000000000..010059919 --- /dev/null +++ b/grammar/testData/diagnostics/integerLiterals/complexMapping.complexMapping.antlrtree.txt @@ -0,0 +1,897 @@ +File: complexMapping.complexMapping.kt - cd174e3fbef6f7d5d6ca01d07c062e42 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + RANGLE(">") + simpleIdentifier + Identifier("range") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("ranges") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Pair") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + quest + QUEST_NO_WS("?") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ranges") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Ranges") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("C") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("M") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + RANGLE(">") + RANGLE(">") + simpleIdentifier + Identifier("map") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("transform") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ranges") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("INF") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("listOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INF") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + RPAREN(")") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INF") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INF") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + RPAREN(")") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INF") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("6") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INF") + RPAREN(")") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("range") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INF") + RPAREN(")") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("First") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("compose") + RPAREN(")") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("second") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Second") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("compose") + RPAREN(")") + semis + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/integerLiterals/literalInCompletedGeneric.antlrtree.txt b/grammar/testData/diagnostics/integerLiterals/literalInCompletedGeneric.antlrtree.txt new file mode 100644 index 000000000..4e751b20d --- /dev/null +++ b/grammar/testData/diagnostics/integerLiterals/literalInCompletedGeneric.antlrtree.txt @@ -0,0 +1,252 @@ +File: literalInCompletedGeneric.kt - 281be22d566c9abd8e25290e4fd22d28 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("values") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Pair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/integerLiterals/sortedBy.antlrtree.txt b/grammar/testData/diagnostics/integerLiterals/sortedBy.antlrtree.txt new file mode 100644 index 000000000..5545f41b3 --- /dev/null +++ b/grammar/testData/diagnostics/integerLiterals/sortedBy.antlrtree.txt @@ -0,0 +1,510 @@ +File: sortedBy.kt - 2f617ef9edebc22645cb40e5a325397f + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("Cause") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ChallengeFunction") + ASSIGNMENT("=") + type + typeModifiers + typeModifier + SUSPEND("suspend") + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Cause") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("FIRST") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("SECOND") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("ERROR") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("LAST") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Some") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("register") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mutableListOf") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Pair") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Cause") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ChallengeFunction") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("challenges") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ChallengeFunction") + RANGLE(">") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("register") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("filter") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ERROR") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("sortedBy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("FIRST") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SECOND") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AssertionError") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("map") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("second") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/integerLiterals/vararg.antlrtree.txt b/grammar/testData/diagnostics/integerLiterals/vararg.antlrtree.txt new file mode 100644 index 000000000..7e05d44cf --- /dev/null +++ b/grammar/testData/diagnostics/integerLiterals/vararg.antlrtree.txt @@ -0,0 +1,686 @@ +File: vararg.kt - 1a5f602f805d73bec94deeefdf669a11 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + simpleIdentifier + Identifier("arrayData") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("values") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + RANGLE(">") + simpleIdentifier + Identifier("arrayDataNoBound") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("values") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayData") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayData") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayDataNoBound") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("S") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("S") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("I") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparable") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + RANGLE(">") + simpleIdentifier + Identifier("id") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/invisibleClassInsteadOfFun.Main.antlrtree.txt b/grammar/testData/diagnostics/invisibleClassInsteadOfFun.Main.antlrtree.txt new file mode 100644 index 000000000..63dcecf64 --- /dev/null +++ b/grammar/testData/diagnostics/invisibleClassInsteadOfFun.Main.antlrtree.txt @@ -0,0 +1,140 @@ +File: invisibleClassInsteadOfFun.Main.kt - 42804a7c6b4a436b491ab691e9da2938 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("main") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pagind") + DOT(".") + simpleIdentifier + Identifier("QueryPagingSource") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("QueryPagingSource") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("QueryPagingSource") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/invisibleClassInsteadOfFun.pagind_QueryPagingSource.antlrtree.txt b/grammar/testData/diagnostics/invisibleClassInsteadOfFun.pagind_QueryPagingSource.antlrtree.txt new file mode 100644 index 000000000..1c28b8579 --- /dev/null +++ b/grammar/testData/diagnostics/invisibleClassInsteadOfFun.pagind_QueryPagingSource.antlrtree.txt @@ -0,0 +1,90 @@ +File: invisibleClassInsteadOfFun.pagind_QueryPagingSource.kt - e8a7808b805cfd61ff36a3db1076de81 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pagind") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("QueryPagingSource") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Key") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("RowType") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("RowType") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + simpleIdentifier + Identifier("QueryPagingSource") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("randomParam") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/invisibleMemberDestructuring.antlrtree.txt b/grammar/testData/diagnostics/invisibleMemberDestructuring.antlrtree.txt new file mode 100644 index 000000000..cac351ea7 --- /dev/null +++ b/grammar/testData/diagnostics/invisibleMemberDestructuring.antlrtree.txt @@ -0,0 +1,116 @@ +File: invisibleMemberDestructuring.kt - d26845bc0d83e1fc69d2d6dce1ff333a + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + multiVariableDeclaration + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("p1") + COMMA(",") + variableDeclaration + simpleIdentifier + Identifier("p2") + RPAREN(")") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/collectionOverrides/nonDirectHiddenOverride.antlrtree.txt b/grammar/testData/diagnostics/j+k/collectionOverrides/nonDirectHiddenOverride.antlrtree.txt new file mode 100644 index 000000000..aab59c286 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/collectionOverrides/nonDirectHiddenOverride.antlrtree.txt @@ -0,0 +1,404 @@ +File: nonDirectHiddenOverride.kt - 98bd2f9ede6e9caca404c8a8ea9112c1 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("sort") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparator") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("sort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("z") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comparator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("sort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("sort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("z") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("sort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/javaLangStringCtr.antlrtree.txt b/grammar/testData/diagnostics/j+k/javaLangStringCtr.antlrtree.txt new file mode 100644 index 000000000..a56be416a --- /dev/null +++ b/grammar/testData/diagnostics/j+k/javaLangStringCtr.antlrtree.txt @@ -0,0 +1,182 @@ +File: javaLangStringCtr.kt - 04bac756bb5516ececf9f8249cd03854 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("String") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("byteArrayOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("6") + RPAREN(")") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/kt60580.usage.antlrtree.txt b/grammar/testData/diagnostics/j+k/kt60580.usage.antlrtree.txt new file mode 100644 index 000000000..9f7f44347 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/kt60580.usage.antlrtree.txt @@ -0,0 +1,206 @@ +File: kt60580.usage.kt - 6a3e0d9be3fe9080dc74be607656939a + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPE") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Anno") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("P") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T1") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T2") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("t1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T1") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("t2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T2") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("m") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Manager") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + typeProjectionModifiers + typeProjectionModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("m") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("action") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/ktij24272.use.antlrtree.txt b/grammar/testData/diagnostics/j+k/ktij24272.use.antlrtree.txt new file mode 100644 index 000000000..c3a57e9b6 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/ktij24272.use.antlrtree.txt @@ -0,0 +1,154 @@ +File: ktij24272.use.kt - 55960f80bde7375b7a10ab740ea924bc + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("one") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("getStructureElementFor") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SuperJava") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Child2") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Child1") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/nullForOptionalOf.antlrtree.txt b/grammar/testData/diagnostics/j+k/nullForOptionalOf.antlrtree.txt new file mode 100644 index 000000000..f820aa268 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/nullForOptionalOf.antlrtree.txt @@ -0,0 +1,100 @@ +File: nullForOptionalOf.kt - f1b67536725da855070d6a309b4888d6 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("util") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Optional") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("of") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.KIntermediateClass.antlrtree.txt b/grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.KIntermediateClass.antlrtree.txt new file mode 100644 index 000000000..12581bb7a --- /dev/null +++ b/grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.KIntermediateClass.antlrtree.txt @@ -0,0 +1,389 @@ +File: privatePropertyAndSetterMultiModule.KIntermediateClass.kt - a4d514812caecf2f8a190c9252620351 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("KIntermediateClass") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("JBaseInterface") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("data2") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getData2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("setData2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("data4") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getData4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("setData4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + DATA("data") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("data5") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getData5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("setData5") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + DATA("data") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.Main.antlrtree.txt b/grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.Main.antlrtree.txt new file mode 100644 index 000000000..eb03d56b1 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/privatePropertyAndSetterMultiModule.Main.antlrtree.txt @@ -0,0 +1,287 @@ +File: privatePropertyAndSetterMultiModule.Main.kt - 1c55b36be38913d772c00180d9c4ac40 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("editorTabs") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JChildClass") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("editorTabs") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getData2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("editorTabs") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setData2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("editorTabs") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getData4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("editorTabs") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setData4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("editorTabs") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getData5") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("editorTabs") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setData5") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/propagateFlexibleTypeToAnonymousFunction.usage.antlrtree.txt b/grammar/testData/diagnostics/j+k/propagateFlexibleTypeToAnonymousFunction.usage.antlrtree.txt new file mode 100644 index 000000000..155ae466d --- /dev/null +++ b/grammar/testData/diagnostics/j+k/propagateFlexibleTypeToAnonymousFunction.usage.antlrtree.txt @@ -0,0 +1,114 @@ +File: propagateFlexibleTypeToAnonymousFunction.usage.kt - 60871b08eef1efb09e736f8a13815430 + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("propertyToResolve") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("function") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText(" (") + lineStringContent + LineStrRef("$it") + lineStringContent + LineStrText(")") + QUOTE_CLOSE(""") + RCURL("}") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/properties/unitVsVoid.main.antlrtree.txt b/grammar/testData/diagnostics/j+k/properties/unitVsVoid.main.antlrtree.txt new file mode 100644 index 000000000..ee9fde12c --- /dev/null +++ b/grammar/testData/diagnostics/j+k/properties/unitVsVoid.main.antlrtree.txt @@ -0,0 +1,329 @@ +File: unitVsVoid.main.kt - bb158529f9dd4d7dbb2ecdd8c91a96b6 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("J") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value1") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value2") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("j") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("value3") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/rawTypesFromCaptured.test.antlrtree.txt b/grammar/testData/diagnostics/j+k/rawTypesFromCaptured.test.antlrtree.txt new file mode 100644 index 000000000..b58833959 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/rawTypesFromCaptured.test.antlrtree.txt @@ -0,0 +1,272 @@ +File: rawTypesFromCaptured.test.kt - 0426adcd590923d48888b2abc7ec70b4 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("StubBasedPsiElement") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hashCode") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/rawTypesFromCapturedOriginal.test.antlrtree.txt b/grammar/testData/diagnostics/j+k/rawTypesFromCapturedOriginal.test.antlrtree.txt new file mode 100644 index 000000000..81456d544 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/rawTypesFromCapturedOriginal.test.antlrtree.txt @@ -0,0 +1,320 @@ +File: rawTypesFromCapturedOriginal.test.kt - bd19415eb5f7244f9e35dcc5e0708371 + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("STRING_TEMPLATE_EMPTY_ARRAY") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("emptyArray") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KtStringTemplateExpression") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("KtStringTemplateExpression") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("PsiElement") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("StubBasedPsiElement") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KtStringTemplateExpression") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("stub") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("expressions") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getChildrenByType") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("STRING_TEMPLATE_EMPTY_ARRAY") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expressions") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("firstOrNull") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/specialBuiltIns/inheritanceThroughEmptyClass.main.antlrtree.txt b/grammar/testData/diagnostics/j+k/specialBuiltIns/inheritanceThroughEmptyClass.main.antlrtree.txt new file mode 100644 index 000000000..961dd2040 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/specialBuiltIns/inheritanceThroughEmptyClass.main.antlrtree.txt @@ -0,0 +1,70 @@ +File: inheritanceThroughEmptyClass.main.kt - 03358ce8739b327959e4ea74018dd179 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("util") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("UniqueArrayList") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("AbstractSerializableListDecorator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MutableSet") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/staticImportViaInheritance.test.antlrtree.txt b/grammar/testData/diagnostics/j+k/staticImportViaInheritance.test.antlrtree.txt new file mode 100644 index 000000000..b86194d54 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/staticImportViaInheritance.test.antlrtree.txt @@ -0,0 +1,106 @@ +File: staticImportViaInheritance.test.kt - 304766a7ac291a8f61ac55ecd335d363 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("Foo") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("Foo") + DOT(".") + simpleIdentifier + Identifier("BAR") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("BAR") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fooBar") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("BAR") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationCaptureObject.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationCaptureObject.antlrtree.txt new file mode 100644 index 000000000..8f69d193c --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationCaptureObject.antlrtree.txt @@ -0,0 +1,100 @@ +File: syntheticAssignmentInLambdaExpressionBody.LiveAllocationCaptureObject.kt - 293b99d5fb85b3d7537f047c746bc31c + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("LiveAllocationCaptureObject") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("queryJavaInstanceDelta") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("LiveAllocationInstanceObject") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("deallocTime") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("42L") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationInstanceObject.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationInstanceObject.antlrtree.txt new file mode 100644 index 000000000..65e9e36f6 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticAssignmentInLambdaExpressionBody.LiveAllocationInstanceObject.antlrtree.txt @@ -0,0 +1,91 @@ +File: syntheticAssignmentInLambdaExpressionBody.LiveAllocationInstanceObject.kt - a8affeb8d41b214eee3a04dfee07f961 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("LiveAllocationInstanceObject") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("InstanceObject") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getDeallocTime") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("42L") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("setDeallocTime") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("deallocTime") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden.KtCodeFragment.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden.KtCodeFragment.antlrtree.txt new file mode 100644 index 000000000..f36864340 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden.KtCodeFragment.antlrtree.txt @@ -0,0 +1,168 @@ +File: syntheticPropertyOverridden.KtCodeFragment.kt - ac7814766296ba47ead8aa222260e5fd + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("KtCodeFragment") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("JavaCodeFragment") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("thisType") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("PsiType") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getThisType") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("thisType") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("setThisType") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("psiType") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("PsiType") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("thisType") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("psiType") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.DeserializedClassDescriptor.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.DeserializedClassDescriptor.antlrtree.txt new file mode 100644 index 000000000..7214cd33a --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.DeserializedClassDescriptor.antlrtree.txt @@ -0,0 +1,300 @@ +File: syntheticPropertyOverridden2.DeserializedClassDescriptor.kt - 18f37ee531076ff6f206fa40499337a6 + packageHeader + importList + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("ProtoEnumFlags") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("modality") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Modality") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Modality") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FINAL") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DeserializedClassDescriptor") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ClassDescriptor") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("modality") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ProtoEnumFlags") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("modality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getModality") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("modality") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("modality") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Modality") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Modality") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FINAL") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DeserializedClassDescriptor2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ClassDescriptor") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("modality") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("modality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getModality") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("modality") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.Modality.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.Modality.antlrtree.txt new file mode 100644 index 000000000..e528bdb62 --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.Modality.antlrtree.txt @@ -0,0 +1,26 @@ +File: syntheticPropertyOverridden2.Modality.kt - 8309e722347ca58e105050c167358358 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Modality") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("FINAL") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.DeserializedClassDescriptor.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.DeserializedClassDescriptor.antlrtree.txt new file mode 100644 index 000000000..d09565c1c --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.DeserializedClassDescriptor.antlrtree.txt @@ -0,0 +1,300 @@ +File: syntheticPropertyOverridden2.reversed.DeserializedClassDescriptor.kt - 18f37ee531076ff6f206fa40499337a6 + packageHeader + importList + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("ProtoEnumFlags") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("modality") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Modality") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Modality") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FINAL") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DeserializedClassDescriptor") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ClassDescriptor") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("modality") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ProtoEnumFlags") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("modality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getModality") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("modality") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("modality") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Modality") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Modality") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FINAL") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DeserializedClassDescriptor2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ClassDescriptor") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("modality") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("modality") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getModality") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("modality") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.Modality.antlrtree.txt b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.Modality.antlrtree.txt new file mode 100644 index 000000000..cacde716b --- /dev/null +++ b/grammar/testData/diagnostics/j+k/syntheticPropertyOverridden2.reversed.Modality.antlrtree.txt @@ -0,0 +1,26 @@ +File: syntheticPropertyOverridden2.reversed.Modality.kt - 8309e722347ca58e105050c167358358 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Modality") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("FINAL") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt46483.antlrtree.txt b/grammar/testData/diagnostics/kt46483.antlrtree.txt new file mode 100644 index 000000000..7a3edc8b5 --- /dev/null +++ b/grammar/testData/diagnostics/kt46483.antlrtree.txt @@ -0,0 +1,342 @@ +File: kt46483.kt - 9d9f65461840c6983b0e79a1543217d8 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Repeatable") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPE_PARAMETER") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("TypeParameterAnn") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("name") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Generic") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Z") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("TypeParameterAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("T") + QUOTE_CLOSE(""") + RPAREN(")") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + simpleIdentifier + Identifier("whereClauseWithAnnotation") + functionValueParameters + LPAREN("(") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("TypeParameterAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Prohibit me!!!") + QUOTE_CLOSE(""") + RPAREN(")") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Generic") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + functionBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("TypeParameterAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("T") + QUOTE_CLOSE(""") + RPAREN(")") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + typeConstraints + WHERE("where") + typeConstraint + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("TypeParameterAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Prohibit me!!!") + QUOTE_CLOSE(""") + RPAREN(")") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Generic") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt53988.antlrtree.txt b/grammar/testData/diagnostics/kt53988.antlrtree.txt new file mode 100644 index 000000000..20356e609 --- /dev/null +++ b/grammar/testData/diagnostics/kt53988.antlrtree.txt @@ -0,0 +1,49 @@ +File: kt53988.kt - c669232d3f33356b39a77eefaaa32170 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + LCURL("{") + NL("\n") + RETURN("return") + NL("\n") + DOT(".") + NL("\n") + UnsignedLiteral("1u") + NL("\n") + THROW("throw") + Identifier("AssertionError") + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt54587_1.antlrtree.txt b/grammar/testData/diagnostics/kt54587_1.antlrtree.txt new file mode 100644 index 000000000..e69835f1e --- /dev/null +++ b/grammar/testData/diagnostics/kt54587_1.antlrtree.txt @@ -0,0 +1,174 @@ +File: kt54587_1.kt - b750988c77cf35562728b48a643d5a62 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MyClass") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SomeClass") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SomeClass") + DOT(".") + simpleIdentifier + Identifier("component1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SomeClass") + DOT(".") + simpleIdentifier + Identifier("component2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + multiVariableDeclaration + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("o") + COMMA(",") + variableDeclaration + simpleIdentifier + Identifier("o2") + RPAREN(")") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClass") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + multiVariableDeclaration + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("o3") + COMMA(",") + variableDeclaration + simpleIdentifier + Identifier("o4") + RPAREN(")") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyClass") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt54587_2.antlrtree.txt b/grammar/testData/diagnostics/kt54587_2.antlrtree.txt new file mode 100644 index 000000000..aae9f3a64 --- /dev/null +++ b/grammar/testData/diagnostics/kt54587_2.antlrtree.txt @@ -0,0 +1,183 @@ +File: kt54587_2.kt - 4e148ccb8aed626f6ff4ef4f11931a98 + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("one") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NextMissing") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + RPAREN(")") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Doo") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Doo") + DOT(".") + simpleIdentifier + Identifier("next") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("NextMissing") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("iterator") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NextMissing2") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("NextMissing2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("hasNext") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt55181.antlrtree.txt b/grammar/testData/diagnostics/kt55181.antlrtree.txt new file mode 100644 index 000000000..55a8d074c --- /dev/null +++ b/grammar/testData/diagnostics/kt55181.antlrtree.txt @@ -0,0 +1,66 @@ +File: kt55181.kt - 3b7ccc569821e6b1479dba0a48b41b27 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("str") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt55666.antlrtree.txt b/grammar/testData/diagnostics/kt55666.antlrtree.txt new file mode 100644 index 000000000..ae23b8874 --- /dev/null +++ b/grammar/testData/diagnostics/kt55666.antlrtree.txt @@ -0,0 +1,286 @@ +File: kt55666.kt - 035f7e9a2778e97c9d062124833cfb7a + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("l2f1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("label2simple1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("l2f1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@label2simple1") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("local") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("l2f1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@local") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + label + simpleIdentifier + Identifier("labelLocal") + AT_POST_WS("@ ") + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("labelledLocal") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("l2f1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN_AT("return@labelLocal") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("label2simple1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt55733.antlrtree.txt b/grammar/testData/diagnostics/kt55733.antlrtree.txt new file mode 100644 index 000000000..b03416eb2 --- /dev/null +++ b/grammar/testData/diagnostics/kt55733.antlrtree.txt @@ -0,0 +1,106 @@ +File: kt55733.kt - 00ed2d9d6927e4c7b3abfbcddd86eb72 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("appendable") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Appendable") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("stringBuilder") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("StringBuilder") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("exception") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("IllegalStateException") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt56612.antlrtree.txt b/grammar/testData/diagnostics/kt56612.antlrtree.txt new file mode 100644 index 000000000..48f2defe4 --- /dev/null +++ b/grammar/testData/diagnostics/kt56612.antlrtree.txt @@ -0,0 +1,456 @@ +File: kt56612.kt - 74b959f4b4a3054b82bb51665be3e97a + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("FlameGraphModel") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + INTERNAL("internal") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("CallUsageNode") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallTreeNode") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BaseCallStackElement") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CallTreeNode") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("TreeNodeWithParent") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallWithValue") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("TreeNodeWithParent") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("Data") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CallWithValue") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("BaseCallStackElement") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("CallUsageNodeFlameGraphModel") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Call") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("FlameGraphModel") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallTreeNode") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Call") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("model") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FlameGraphModel") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallUsageNode") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("afterCast") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("model") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallUsageNodeFlameGraphModel") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + INTERNAL("internal") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("CallTreeNodeTypealias") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallTreeNode") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("CallUsageNodeFlameGraphModelWithTypealiasedSupertypeArgument") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Call") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("FlameGraphModel") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallTreeNodeTypealias") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Call") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("model") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FlameGraphModel") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallUsageNode") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("afterCast") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("model") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CallUsageNodeFlameGraphModelWithTypealiasedSupertypeArgument") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt56665.antlrtree.txt b/grammar/testData/diagnostics/kt56665.antlrtree.txt new file mode 100644 index 000000000..c50fd5a4b --- /dev/null +++ b/grammar/testData/diagnostics/kt56665.antlrtree.txt @@ -0,0 +1,122 @@ +File: kt56665.kt - 3efadb18dbd322b613d1d8caae6afd39 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + PRIVATE("private") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Bar") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Gau") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("Gau") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Bar") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("Gau2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Bar2") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + PRIVATE("private") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Bar2") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Gau2") + RANGLE(">") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt56723.antlrtree.txt b/grammar/testData/diagnostics/kt56723.antlrtree.txt new file mode 100644 index 000000000..7bb5cef1b --- /dev/null +++ b/grammar/testData/diagnostics/kt56723.antlrtree.txt @@ -0,0 +1,2102 @@ +File: kt56723.kt - fd43f3a1056c1adb7bb1605febe1e28d + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Wrapper") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAR("var") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + assignableSuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("X") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Wrapper2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("w") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w2") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper2") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("w") + assignableSuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("X") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Indexible") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + GET("get") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrRef("$index") + QUOTE_CLOSE(""") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + SET("set") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("IndexibleRef") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("ind") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Indexible") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("IndexibleRefRef") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("ref") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IndexibleRef") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("ban") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("refRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IndexibleRefRef") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("ref") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IndexibleRef") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ref") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ind") + assignableSuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RSQUARE("]") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("X") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("refRef") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ref") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ind") + assignableSuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RSQUARE("]") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("X") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda2") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ref") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ind") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("X") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda3") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("refRef") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ref") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ind") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("X") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda4") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("PlusAssignable") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("plusAssign") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Indexible2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + GET("get") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PlusAssignable") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + SET("set") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Indexible2Ref") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("ind") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Indexible2") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bam") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("ref") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Indexible2Ref") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ref") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ind") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RSQUARE("]") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambd2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ref") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("ind") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + GET("get") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("plusAssign") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DelegatedHolder") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("delegated") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("desc") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("test") + QUOTE_CLOSE(""") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("desc") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bap") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("holder") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DelegatedHolder") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("holder") + assignableSuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("delegated") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Y") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt56769.antlrtree.txt b/grammar/testData/diagnostics/kt56769.antlrtree.txt new file mode 100644 index 000000000..8ca7665e2 --- /dev/null +++ b/grammar/testData/diagnostics/kt56769.antlrtree.txt @@ -0,0 +1,498 @@ +File: kt56769.kt - e03c63ffb9f5abf53f1ec72237187bc1 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + annotation + singleAnnotation + annotationUseSiteTarget + AT_NO_WS("@") + RECEIVER("receiver") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Anno") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("train") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + annotation + singleAnnotation + annotationUseSiteTarget + AT_NO_WS("@") + RECEIVER("receiver") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("plane") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_NO_WS("@") + RECEIVER("receiver") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("vein") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + LANGLE("<") + topLevelObject + declaration + topLevelObject + declaration + AT_NO_WS("@") + FILE("file") + COLON(":") + Identifier("Anno") + Identifier("String") + RANGLE(">") + RPAREN(")") + LCURL("{") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("rain") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("strain") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeModifiers + typeModifier + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + RECEIVER("receiver") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("drain") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + FILE("file") + COLON(":") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("brain") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + parenthesizedType + LPAREN("(") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + DOT(".") + simpleIdentifier + Identifier("crane") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FILE") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Anno2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeModifiers + typeModifier + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + RECEIVER("receiver") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Anno2") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("pain") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt56876.antlrtree.txt b/grammar/testData/diagnostics/kt56876.antlrtree.txt new file mode 100644 index 000000000..8afce8dca --- /dev/null +++ b/grammar/testData/diagnostics/kt56876.antlrtree.txt @@ -0,0 +1,492 @@ +File: kt56876.kt - d4b41ad5f64a9667dd3b2588f6d87e22 + NL("\n") + fileAnnotation + AT_PRE_WS("\n@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalContracts") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Result") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Success") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Result") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("isSuccess1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Result") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Result") + DOT(".") + simpleIdentifier + Identifier("isSuccess2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Result") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt56877.antlrtree.txt b/grammar/testData/diagnostics/kt56877.antlrtree.txt new file mode 100644 index 000000000..964ac8b4f --- /dev/null +++ b/grammar/testData/diagnostics/kt56877.antlrtree.txt @@ -0,0 +1,978 @@ +File: kt56877.kt - 2a76f486e3478fbb421c91d16fca8a4d + fileAnnotation + AT_NO_WS("@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalContracts") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Success") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Result") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Result") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("someProperty") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RCURL("}") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("isSuccess1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("this") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Result") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@Result") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("isSuccess2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("this") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Result") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("someProperty") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@Result") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("someProperty") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Result") + DOT(".") + simpleIdentifier + Identifier("isSuccess3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("this") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("isSuccess3") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@isSuccess3") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Success") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Result") + DOT(".") + simpleIdentifier + Identifier("isSuccess4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("this") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("isSuccess4") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("someProperty") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@isSuccess4") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("someProperty") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt57085.antlrtree.txt b/grammar/testData/diagnostics/kt57085.antlrtree.txt new file mode 100644 index 000000000..b287dedce --- /dev/null +++ b/grammar/testData/diagnostics/kt57085.antlrtree.txt @@ -0,0 +1,137 @@ +File: kt57085.kt - 108485856a4996a61a309bfffc0d0d9a + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("inapplicable_jvm_name") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + INTERFACE("interface") + simpleIdentifier + Identifier("Factory") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("JvmName") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("supportsMultilevelIntrospection") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("supportsMultilevelIntrospection") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt57175.antlrtree.txt b/grammar/testData/diagnostics/kt57175.antlrtree.txt new file mode 100644 index 000000000..1d0522955 --- /dev/null +++ b/grammar/testData/diagnostics/kt57175.antlrtree.txt @@ -0,0 +1,48 @@ +File: kt57175.kt - a44f8b3020d89da36bf44c938cd23481 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Aliased") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Tag") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("tags") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Aliased") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt57214.A.antlrtree.txt b/grammar/testData/diagnostics/kt57214.A.antlrtree.txt new file mode 100644 index 000000000..a2c378096 --- /dev/null +++ b/grammar/testData/diagnostics/kt57214.A.antlrtree.txt @@ -0,0 +1,96 @@ +File: kt57214.A.kt - 4f4d82d701af797c84d75e7b004590cc + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ConfigurationTarget") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ConfigField") + VAL("val") + simpleIdentifier + Identifier("target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("RUNTIME") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ConfigField") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt57214.B.antlrtree.txt b/grammar/testData/diagnostics/kt57214.B.antlrtree.txt new file mode 100644 index 000000000..90922ac3b --- /dev/null +++ b/grammar/testData/diagnostics/kt57214.B.antlrtree.txt @@ -0,0 +1,91 @@ +File: kt57214.B.kt - 8ffe54167039ea7373dc6c7444e6128b + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("RUNTIME") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ConfigField") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ConfigurationTarget") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ConfigField") + VAL("val") + simpleIdentifier + Identifier("target") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt58583.DialogWrapper.antlrtree.txt b/grammar/testData/diagnostics/kt58583.DialogWrapper.antlrtree.txt new file mode 100644 index 000000000..86a7bb03a --- /dev/null +++ b/grammar/testData/diagnostics/kt58583.DialogWrapper.antlrtree.txt @@ -0,0 +1,44 @@ +File: kt58583.DialogWrapper.kt - b8522480853a9ffac9de050ceac541c5 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pkg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("DialogWrapper") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("DialogWrapperAction") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt58583.Main.antlrtree.txt b/grammar/testData/diagnostics/kt58583.Main.antlrtree.txt new file mode 100644 index 000000000..1df789107 --- /dev/null +++ b/grammar/testData/diagnostics/kt58583.Main.antlrtree.txt @@ -0,0 +1,117 @@ +File: kt58583.Main.kt - 0ef5e437ce797b32e06c9671dd005b81 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("DialogWrapper") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("DialogWrapper") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("DialogWrapperAction") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/kt60638.antlrtree.txt b/grammar/testData/diagnostics/kt60638.antlrtree.txt new file mode 100644 index 000000000..ca33c3e38 --- /dev/null +++ b/grammar/testData/diagnostics/kt60638.antlrtree.txt @@ -0,0 +1,128 @@ +File: kt60638.kt - 5bb1d7401ba9ae6f7842caf0b6a6d06f + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("usage") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MyType") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MyClass") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyClass") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("isInterface") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("usage") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("type") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyType") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("type") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("isInterface") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/labels/labelToOuterLambda.antlrtree.txt b/grammar/testData/diagnostics/labels/labelToOuterLambda.antlrtree.txt new file mode 100644 index 000000000..c13455374 --- /dev/null +++ b/grammar/testData/diagnostics/labels/labelToOuterLambda.antlrtree.txt @@ -0,0 +1,658 @@ +File: labelToOuterLambda.kt - c87c6468ec1df10db890d112fd1f8e15 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("outerLambda") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("action") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lambda") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("consume") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("consumeInt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("outerLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("this") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("outerLambda") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("outerLambda") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("innerLambda") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + label + simpleIdentifier + Identifier("this") + AT_NO_WS("@") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("innerLambda") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + modifiers + modifier + memberModifier + LATEINIT("lateinit") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("apply") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@apply") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hello") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@apply") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("hello") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("hello") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/missingIteratorMissing.antlrtree.txt b/grammar/testData/diagnostics/missingIteratorMissing.antlrtree.txt new file mode 100644 index 000000000..b20d0c589 --- /dev/null +++ b/grammar/testData/diagnostics/missingIteratorMissing.antlrtree.txt @@ -0,0 +1,120 @@ +File: missingIteratorMissing.kt - 0994916847b3391e8f7db8cc7a07dcba + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("iterator") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Iterator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/enumConstName_after.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/enumConstName_after.antlrtree.txt new file mode 100644 index 000000000..f9b127367 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/enumConstName_after.antlrtree.txt @@ -0,0 +1,212 @@ +File: enumConstName_after.kt - a8a59c646586fd3b94d057f4b405d069 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumClass") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("OK") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("VALUE") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("anotherValue") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("WITH_UNDERSCORE") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("OK") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("VALUE") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("anotherValue") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("WITH_UNDERSCORE") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/enumConstName_before.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/enumConstName_before.antlrtree.txt new file mode 100644 index 000000000..27a4b7981 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/enumConstName_before.antlrtree.txt @@ -0,0 +1,213 @@ +File: enumConstName_before.kt - c5ceb15175d8b55ff0eed0c6f79cedca + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumClass") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("OK") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("VALUE") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("anotherValue") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("WITH_UNDERSCORE") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("OK") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("VALUE") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("anotherValue") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("WITH_UNDERSCORE") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/enumJavaName_after.main.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/enumJavaName_after.main.antlrtree.txt new file mode 100644 index 000000000..73be9ddb5 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/enumJavaName_after.main.antlrtree.txt @@ -0,0 +1,47 @@ +File: enumJavaName_after.main.kt - efc79a8a7d8884654c17c63c3a74e27a + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("CompressionType") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("OK") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/equals_after.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/equals_after.antlrtree.txt new file mode 100644 index 000000000..72129a1f5 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/equals_after.antlrtree.txt @@ -0,0 +1,2162 @@ +File: equals_after.kt - fa59eb8ef45970c1ce8af1fac8073b12 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'1'") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'2'") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'2'") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'2'") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'1'") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'1'") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("1L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("2L") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("2L") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("2L") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("1L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("1L") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0f") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0f") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0f") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0f") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("otherStr") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/equals_before.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/equals_before.antlrtree.txt new file mode 100644 index 000000000..2ee53a831 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/equals_before.antlrtree.txt @@ -0,0 +1,2162 @@ +File: equals_before.kt - cdb6dbac72b0f2e5fa4329e15aaaa26a + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsBoolean4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'1'") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'2'") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'2'") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'2'") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'1'") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsChar4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'1'") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsByte4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsShort4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsInt4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("1L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("2L") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("2L") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("2L") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("1L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsLong4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("1L") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0f") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0f") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0f") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsFloat4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0f") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsDoable4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("otherStr") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("equalsString4") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("someStr") + QUOTE_CLOSE(""") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/ifConstVal_after.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/ifConstVal_after.antlrtree.txt new file mode 100644 index 000000000..8ad91dbe0 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/ifConstVal_after.antlrtree.txt @@ -0,0 +1,1001 @@ +File: ifConstVal_after.kt - c46c9b75f9685cb49282581edba636f3 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("flag") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("condition") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("True") + QUOTE_CLOSE(""") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Error") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withWhen") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("True") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Error") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withWhen2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("True") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Error") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withWhen3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("3") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("multibranchIf") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1000") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("nonConstFlag") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorConstIf") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonConstFlag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorBranch") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonConstFlag") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/ifConstVal_before.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/ifConstVal_before.antlrtree.txt new file mode 100644 index 000000000..21fee8942 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/ifConstVal_before.antlrtree.txt @@ -0,0 +1,1002 @@ +File: ifConstVal_before.kt - e0fd911bcc5b6f33f6aae863194d1917 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("flag") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("condition") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("True") + QUOTE_CLOSE(""") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Error") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withWhen") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("True") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Error") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withWhen2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("True") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Error") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withWhen3") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("3") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("multibranchIf") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1000") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("nonConstFlag") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorConstIf") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonConstFlag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorBranch") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("nonConstFlag") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/kCallable_after.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/kCallable_after.antlrtree.txt new file mode 100644 index 000000000..169549c85 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/kCallable_after.antlrtree.txt @@ -0,0 +1,585 @@ +File: kCallable_after.kt - ae6fcb6e4b2029165b10805e22e7c030 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SomeClassWithName") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anotherProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("className") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("propName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + PROPERTY("property") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anotherPropName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("anotherProperty") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fooName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("barName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("stringClassName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("String") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lengthPropName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("String") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("length") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorAccess") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + PROPERTY("property") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorPlus") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + PROPERTY("property") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/kCallable_before.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/kCallable_before.antlrtree.txt new file mode 100644 index 000000000..b3c0bb431 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/kCallable_before.antlrtree.txt @@ -0,0 +1,586 @@ +File: kCallable_before.kt - c356e6a489cf5726600aff17fee50fef + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SomeClassWithName") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anotherProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("className") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("propName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + PROPERTY("property") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anotherPropName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("anotherProperty") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fooName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("barName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("stringClassName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("String") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lengthPropName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("String") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("length") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorAccess") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + PROPERTY("property") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("errorPlus") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("SomeClassWithName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + PROPERTY("property") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/stringConcatenation.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/stringConcatenation.antlrtree.txt new file mode 100644 index 000000000..a979fd3a3 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/stringConcatenation.antlrtree.txt @@ -0,0 +1,522 @@ +File: stringConcatenation.kt - 67ac18e081e60200b6c35f46670d058c + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("O") + lineStringExpression + LineStrExprStart("${") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'K'") + RCURL("}") + lineStringContent + LineStrText(" ") + lineStringExpression + LineStrExprStart("${") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toLong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RCURL("}") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withInnerConcatenation") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1 ") + lineStringExpression + LineStrExprStart("${") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2 ") + lineStringExpression + LineStrExprStart("${") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + RCURL("}") + lineStringContent + LineStrText(" ") + lineStringExpression + LineStrExprStart("${") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RCURL("}") + lineStringContent + LineStrText(" 5") + QUOTE_CLOSE(""") + RCURL("}") + lineStringContent + LineStrText(" 6") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("toString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("B") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("printA") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("A: ") + lineStringContent + LineStrRef("$A") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("printB") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("B: ") + lineStringContent + LineStrRef("$B") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withNull") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1 ") + lineStringExpression + LineStrExprStart("${") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withNullPlus") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("nonConst") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("withNonConst") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("A ") + lineStringContent + LineStrRef("$nonConst") + lineStringContent + LineStrText(" B") + QUOTE_CLOSE(""") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/stringConcatenationWithObject.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/stringConcatenationWithObject.antlrtree.txt new file mode 100644 index 000000000..668f9e8a6 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/const/stringConcatenationWithObject.antlrtree.txt @@ -0,0 +1,411 @@ +File: stringConcatenationWithObject.kt - 7db91803130c2b171e4f16868307f30d + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("O") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Code") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Code") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("toString") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrRef("$x") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Code") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("toString1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("toString2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("plusString1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("string") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("plusString2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("string") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("stringConcat1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrRef("$O") + QUOTE_CLOSE(""") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("stringConcat2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrRef("$A") + QUOTE_CLOSE(""") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/protectedInExpectActual.antlrtree.txt b/grammar/testData/diagnostics/modifiers/protectedInExpectActual.antlrtree.txt new file mode 100644 index 000000000..0f7e22e79 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/protectedInExpectActual.antlrtree.txt @@ -0,0 +1,365 @@ +File: protectedInExpectActual.kt - 2ce133aae7dd147de357d82715695cdb + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SimpleClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("ExpClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("ActClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + visibilityModifier + PROTECTED("protected") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("ExpOpenClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("SimpleEnum") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("ENTRY") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("ExpEnumClass") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("ENTRY") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt b/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt new file mode 100644 index 000000000..244440a26 --- /dev/null +++ b/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt @@ -0,0 +1,36 @@ +File: suspendAnonymousFunction.kt - 26e4e7dc69d65e0001d894763e520dab + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + receiverType + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/dependsOnModule.a.antlrtree.txt b/grammar/testData/diagnostics/multimodule/dependsOnModule.a.antlrtree.txt new file mode 100644 index 000000000..5b9535532 --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/dependsOnModule.a.antlrtree.txt @@ -0,0 +1,282 @@ +File: dependsOnModule.a.kt - 13e0d4463f1c215cb28ccda674b73b55 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("p") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/dependsOnModule.b.antlrtree.txt b/grammar/testData/diagnostics/multimodule/dependsOnModule.b.antlrtree.txt new file mode 100644 index 000000000..56855a4d8 --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/dependsOnModule.b.antlrtree.txt @@ -0,0 +1,308 @@ +File: dependsOnModule.b.kt - 15ebef185912e352551edeb03cde9d93 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("p") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("inst") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ia") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("iv") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/dependsOnModule.c.antlrtree.txt b/grammar/testData/diagnostics/multimodule/dependsOnModule.c.antlrtree.txt new file mode 100644 index 000000000..2ddb0c7d1 --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/dependsOnModule.c.antlrtree.txt @@ -0,0 +1,305 @@ +File: dependsOnModule.c.kt - 327ad5d3ff87dcf302a8bb0df564016f + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("p") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("inst") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ia") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("iv") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/friendModule.a.antlrtree.txt b/grammar/testData/diagnostics/multimodule/friendModule.a.antlrtree.txt new file mode 100644 index 000000000..5b6da323e --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/friendModule.a.antlrtree.txt @@ -0,0 +1,282 @@ +File: friendModule.a.kt - 2cba3f1fcf24008156d7feae7fd10e03 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("p") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/friendModule.b.antlrtree.txt b/grammar/testData/diagnostics/multimodule/friendModule.b.antlrtree.txt new file mode 100644 index 000000000..600e34d2e --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/friendModule.b.antlrtree.txt @@ -0,0 +1,306 @@ +File: friendModule.b.kt - 9cfa06b44858141e55e425a91c60c00a + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("p") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("inst") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ia") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("iv") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/friendModulePrivate.a.antlrtree.txt b/grammar/testData/diagnostics/multimodule/friendModulePrivate.a.antlrtree.txt new file mode 100644 index 000000000..430bc363e --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/friendModulePrivate.a.antlrtree.txt @@ -0,0 +1,282 @@ +File: friendModulePrivate.a.kt - 0ca3beaca1b39873c3b0156bd872bd32 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("p") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("a") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multimodule/friendModulePrivate.b.antlrtree.txt b/grammar/testData/diagnostics/multimodule/friendModulePrivate.b.antlrtree.txt new file mode 100644 index 000000000..3990f5e2a --- /dev/null +++ b/grammar/testData/diagnostics/multimodule/friendModulePrivate.b.antlrtree.txt @@ -0,0 +1,306 @@ +File: friendModulePrivate.b.kt - 9cfa06b44858141e55e425a91c60c00a + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("p") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("_v") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("inst") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ia") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("iv") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("v") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("inst") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("B") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.common.antlrtree.txt new file mode 100644 index 000000000..ab99027a5 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.common.antlrtree.txt @@ -0,0 +1,88 @@ +File: actualTypealiasToSpecialAnnotation.common.kt - 09547e7222f0c4f92bd45eca89b7ad4c + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("TypealiasToKotlinPkg") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("TypealiasToInternalPkg") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("TypealiasToAnnotationPkg") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("TypealiasToPlatformPkg") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("TypealiasNotToAnnotation") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.jvm.antlrtree.txt new file mode 100644 index 000000000..125431a5d --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/actualTypealiasToSpecialAnnotation.jvm.antlrtree.txt @@ -0,0 +1,193 @@ +File: actualTypealiasToSpecialAnnotation.jvm.kt - 66620dc84d4305bc36dc57fb42ab72eb + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TypealiasToKotlinPkg") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Deprecated") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INVISIBLE_REFERENCE") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + visibilityModifier + INTERNAL("internal") + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TypealiasToInternalPkg") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + INTERNAL("internal") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("RequireKotlin") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TypealiasToAnnotationPkg") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + ANNOTATION("annotation") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Target") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TypealiasToPlatformPkg") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("jvm") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Synchronized") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("NonActualTypealias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Deprecated") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TypealiasNotToAnnotation") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("DeprecationLevel") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.common.antlrtree.txt new file mode 100644 index 000000000..6eb8e760e --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.common.antlrtree.txt @@ -0,0 +1,1570 @@ +File: annotationArgumentsConstExpressions.common.kt - bd550de14ac2355c61ad8f043c76f754 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KClass") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ClassArgAnn") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("clazz") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KClass") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ClassForReference") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ClassForReference") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ClassArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ClassForReference") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("getClassExpression") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ClassArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ClassForReference") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ClassForReference") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("differentClassesWithSameName") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("StringArgAnn") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.9") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("stringConstant") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText(".9") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("stringConcatentation") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Constants") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("STR") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Constants") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("STR") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("constantFromInsideObject") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Constants") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("STR") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText(".9") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("stringConcatentationWithProperty") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("MyEnum") + enumClassBody + LCURL("{") + enumEntries + enumEntry + simpleIdentifier + Identifier("FOO") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("BAR") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("EnumArgAnn") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyEnum") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("EnumArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FOO") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("enumArg") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("VarargAnn") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + parameterModifier + VARARG("vararg") + VAL("val") + simpleIdentifier + Identifier("strings") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("VarargAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("varargInAnnotation") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("VarargAnn") + valueArguments + LPAREN("(") + valueArgument + MULT("*") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RSQUARE("]") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("varargInAnnotationWithArraySpread") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ArrayArgAnn") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("strings") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ArrayArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RSQUARE("]") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("arrayInAnnotation") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ArrayArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RSQUARE("]") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("arrayInAnnotationNotMatch") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("NestedAnnArg") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("text") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + modifiers + modifier + parameterModifier + VARARG("vararg") + VAL("val") + simpleIdentifier + Identifier("children") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NestedAnnArg") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("NestedAnnArg") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("text") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("root") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.2") + QUOTE_CLOSE(""") + RPAREN(")") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("complexNestedAnnotations") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("NestedAnnArg") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("text") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("root") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.2") + QUOTE_CLOSE(""") + RPAREN(")") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("complexNestedAnnotationsNotMatch") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.jvm.antlrtree.txt new file mode 100644 index 000000000..6385c2e27 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsConstExpressions.jvm.antlrtree.txt @@ -0,0 +1,1249 @@ +File: annotationArgumentsConstExpressions.jvm.kt - 1c79ef144d90d1521eb3fbcecac64dc9 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + importList + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ClassArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ClassForReference") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("getClassExpression") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ClassArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ClassForReference") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("differentClassesWithSameName") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.9") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("stringConstant") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.9") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("stringConcatentation") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("constantFromInsideObject") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("StringArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.9") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("stringConcatentationWithProperty") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("EnumArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FOO") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("enumArg") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("VarargAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("varargInAnnotation") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("VarargAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("varargInAnnotationWithArraySpread") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ArrayArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("arrayInAnnotation") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ArrayArgAnn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + RSQUARE("]") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("arrayInAnnotationNotMatch") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("NestedAnnArg") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("text") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("root") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.2") + QUOTE_CLOSE(""") + RPAREN(")") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("complexNestedAnnotations") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("NestedAnnArg") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("text") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("root") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2.1") + QUOTE_CLOSE(""") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedAnnArg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("DIFFERENT") + QUOTE_CLOSE(""") + RPAREN(")") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("complexNestedAnnotationsNotMatch") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.common.antlrtree.txt new file mode 100644 index 000000000..d1c878077 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.common.antlrtree.txt @@ -0,0 +1,101 @@ +File: annotationArgumentsDefaults.common.kt - 1de2e680a6d90d52965fb3e2f7bcebfa + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("explicitDefaultArgument") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.jvm.antlrtree.txt new file mode 100644 index 000000000..59ab168fd --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationArgumentsDefaults.jvm.antlrtree.txt @@ -0,0 +1,33 @@ +File: annotationArgumentsDefaults.jvm.kt - 7cc00dcd413f982ba6a7f7e5c69b7e5b + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("explicitDefaultArgument") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.common.antlrtree.txt new file mode 100644 index 000000000..a4ad78939 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.common.antlrtree.txt @@ -0,0 +1,399 @@ +File: annotationTarget.common.kt - 991682b81ec0506805ad39d8c61f5a54 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ExpectIsSubsetOfActual") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ExpectIsSubsetOfActualDifferentOrder") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MoreTargetsOnExpect") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("RepeatedTargetsInExpect") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("allowedTargets") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + RSQUARE("]") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("EmptyTargetsActual") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.jvm.antlrtree.txt new file mode 100644 index 000000000..9da9e9a0e --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTarget.jvm.antlrtree.txt @@ -0,0 +1,477 @@ +File: annotationTarget.jvm.kt - 86caeb518fbae259811d9ae8fcf084c3 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CONSTRUCTOR") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY_GETTER") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ExpectIsSubsetOfActual") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CONSTRUCTOR") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY_GETTER") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ExpectIsSubsetOfActualDifferentOrder") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MoreTargetsOnExpect") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPEALIAS") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("RepeatedTargetsInExpect") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("EmptyTargetsActual") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.common.antlrtree.txt new file mode 100644 index 000000000..cc949f368 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.common.antlrtree.txt @@ -0,0 +1,766 @@ +File: annotationTypeParameters.common.kt - 3dae02f4dffeff173f1a5738808a0b98 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + topLevelObject + declaration + objectDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + OBJECT("object") + simpleIdentifier + Identifier("FakeA") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("sameTypeParam") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("differentTypeParam") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FakeA") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("differentWithSameName") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + quest + QUEST_NO_WS("?") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("nonNullvsNull") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("differentVariance") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("varianceVsNoVariance") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("sameVariance") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("startProjection") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ComplexNested") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + parameterModifier + VARARG("vararg") + VAL("val") + simpleIdentifier + Identifier("anns") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ComplexNested") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ComplexNested") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("complexSame") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ComplexNested") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("complexDiffer") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("NestedWithSameTypeArgument") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + parameterModifier + VARARG("vararg") + VAL("val") + simpleIdentifier + Identifier("anns") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NestedWithSameTypeArgument") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("NestedWithSameTypeArgument") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedWithSameTypeArgument") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("explicitVsInfered") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.jvm.antlrtree.txt new file mode 100644 index 000000000..3f3aa2bdd --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/annotationTypeParameters.jvm.antlrtree.txt @@ -0,0 +1,672 @@ +File: annotationTypeParameters.jvm.kt - dcdbaee6e239d2223e9bde34eae6f0fa + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("sameTypeParam") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("differentTypeParam") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("differentWithSameName") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("nonNullvsNull") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("differentVariance") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("varianceVsNoVariance") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("sameVariance") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + RANGLE(">") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("startProjection") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ComplexNested") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("complexSame") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ComplexNested") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ComplexNested") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("complexDiffer") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("NestedWithSameTypeArgument") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("NestedWithSameTypeArgument") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("explicitVsInfered") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.common.antlrtree.txt new file mode 100644 index 000000000..f93973721 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.common.antlrtree.txt @@ -0,0 +1,146 @@ +File: basicOnDeclaration.common.kt - d008ef7973fcc9383910324a9ae76d88 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("AnnotationMatching") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("AnnotationOnExpectOnly") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("AnnotationOnActualOnly") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("AnnotationInside") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("matches") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("onlyOnExpect") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("onlyOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.jvm.antlrtree.txt new file mode 100644 index 000000000..128dfef9b --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/basicOnDeclaration.jvm.antlrtree.txt @@ -0,0 +1,157 @@ +File: basicOnDeclaration.jvm.kt - 33723505579c05bfbde13bb3bc44091b + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("AnnotationMatching") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("AnnotationOnExpectOnly") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("AnnotationOnActualOnly") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("AnnotationInside") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("matches") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("onlyOnExpect") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("onlyOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.common.antlrtree.txt new file mode 100644 index 000000000..fc0ff041c --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.common.antlrtree.txt @@ -0,0 +1,126 @@ +File: checkDiagnosticFullText.common.kt - e6899613dbf32535c3b928c418e9ee52 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("OnClass") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("OnMember") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("onMember") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("ViaTypealias") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.jvm.antlrtree.txt new file mode 100644 index 000000000..ce4fb01c0 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/checkDiagnosticFullText.jvm.antlrtree.txt @@ -0,0 +1,104 @@ +File: checkDiagnosticFullText.jvm.kt - 54635512b8f024f72094fc5cf93f8242 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("OnClass") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("OnMember") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("onMember") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ViaTypealiasImpl") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ViaTypealias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ViaTypealiasImpl") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.common.antlrtree.txt new file mode 100644 index 000000000..7449412e1 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.common.antlrtree.txt @@ -0,0 +1,80 @@ +File: compatibleOverrides.common.kt - 6b239377cf2a0c5758b558a7bee84312 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("CompatibleOverrides") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("withArg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.jvm.antlrtree.txt new file mode 100644 index 000000000..133b4b227 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/compatibleOverrides.jvm.antlrtree.txt @@ -0,0 +1,73 @@ +File: compatibleOverrides.jvm.kt - 02b22400030f8e947f5faedf0253758d + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("CompatibleOverrides") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("withArg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.common.antlrtree.txt new file mode 100644 index 000000000..634bb03d2 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.common.antlrtree.txt @@ -0,0 +1,276 @@ +File: differentOrder.common.kt - 99e0fe3f0020173d0ca82a3595146d9e + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann2") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann1") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann2") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("AnnotationOrder") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + parameterModifier + VARARG("vararg") + VAL("val") + simpleIdentifier + Identifier("numbers") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann3") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("ValuesOrderInsideAnnotationArgument") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("arg1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("arg2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann4") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("arg1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("arg2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("differentArgumentsOrder") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.jvm.antlrtree.txt new file mode 100644 index 000000000..054a47c0a --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/differentOrder.jvm.antlrtree.txt @@ -0,0 +1,183 @@ +File: differentOrder.jvm.kt - 17609a66a457582385c783f7aa68f6a0 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann2") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann1") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("AnnotationOrder") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann3") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("ValuesOrderInsideAnnotationArgument") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann4") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("arg2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + simpleIdentifier + Identifier("arg1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("differentArgumentsOrder") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.common.antlrtree.txt new file mode 100644 index 000000000..d0f2af0f6 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.common.antlrtree.txt @@ -0,0 +1,161 @@ +File: fakeOverrides.common.kt - 63e9fc6469611d70861bf165aebd5be2 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("noAnnotationOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("FakeOverrideExpect") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("noAnnotationOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("FakeOverrideActual") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("noAnnotationOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.jvm.antlrtree.txt new file mode 100644 index 000000000..a87b39699 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/fakeOverrides.jvm.antlrtree.txt @@ -0,0 +1,131 @@ +File: fakeOverrides.jvm.kt - a851accf0ceaacb0913d5141da39732d + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("FakeOverrideExpect") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("noAnnotationOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Intermediate") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("noAnnotationOnActual") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("FakeOverrideActual") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Intermediate") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.common.antlrtree.txt new file mode 100644 index 000000000..a7e0a96f8 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.common.antlrtree.txt @@ -0,0 +1,80 @@ +File: floatNumbersComparison.common.kt - 2aea06494c84f53cd4bc2218da4a31e5 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("0.3") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("floatNumbersComparison") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.jvm.antlrtree.txt new file mode 100644 index 000000000..a31985240 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/floatNumbersComparison.jvm.antlrtree.txt @@ -0,0 +1,74 @@ +File: floatNumbersComparison.jvm.kt - 6914dde229917fd0e95f1177dea9ac8c + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("0.1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("0.1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("0.1") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("floatNumbersComparison") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.common.antlrtree.txt new file mode 100644 index 000000000..ff26f59f5 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.common.antlrtree.txt @@ -0,0 +1,157 @@ +File: instrinsicConstEvaluation.common.kt - 75a91466e8e4ae90314f2941359240ed + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("MyEnum") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("FOO") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("FOO") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("matching") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("not FOO") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("nonMatching") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.jvm.antlrtree.txt new file mode 100644 index 000000000..f64bf0f0f --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/instrinsicConstEvaluation.jvm.antlrtree.txt @@ -0,0 +1,132 @@ +File: instrinsicConstEvaluation.jvm.kt - a216d342ad1f899cb7d925ce4e580704 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FOO") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("matching") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyEnum") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FOO") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("nonMatching") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.common.antlrtree.txt new file mode 100644 index 000000000..e2c02be76 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.common.antlrtree.txt @@ -0,0 +1,240 @@ +File: kclassArgWithExpectClass.common.kt - 9891018c5a15df80952cb5702a369c60 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KClass") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("clazz") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KClass") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("LinkToExpectInnerClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Inner") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("LinkToExpectInnerClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("WillBeTypealiased") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("WillBeTypealiased") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("linkToExpectClassWhichWillBeTypealiased") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("WillBeTypealiased") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("linkToExpectClassWhichWillBeTypealiased2") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.jvm.antlrtree.txt new file mode 100644 index 000000000..6eb8843c9 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/kclassArgWithExpectClass.jvm.antlrtree.txt @@ -0,0 +1,213 @@ +File: kclassArgWithExpectClass.jvm.kt - ff80294401383b630c94a568fe4ce11c + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("LinkToExpectInnerClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Inner") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("LinkToExpectInnerClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + objectDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + OBJECT("object") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("WillBeTypealiased") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("WillBeTypealiased") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("linkToExpectClassWhichWillBeTypealiased") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Any") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("linkToExpectClassWhichWillBeTypealiased2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.common.antlrtree.txt new file mode 100644 index 000000000..6f1f57e3d --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.common.antlrtree.txt @@ -0,0 +1,112 @@ +File: kotlinAnaloguesForJavaAnnotations.common.kt - 176ec626f8cf6d6d5ce8a98908fda3a2 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("RUNTIME") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("JavaTypealiasAnnotationAnalogue") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("RUNTIME") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("JavaTypealiasKotlinAnnotation") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.jvm.antlrtree.txt new file mode 100644 index 000000000..1283f98e8 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/kotlinAnaloguesForJavaAnnotations.jvm.antlrtree.txt @@ -0,0 +1,44 @@ +File: kotlinAnaloguesForJavaAnnotations.jvm.kt - 4731da4b8bd819775b401ee4cda5f827 + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("JavaTypealiasAnnotationAnalogue") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaTypealiasAnnotationAnalogueImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("JavaTypealiasKotlinAnnotation") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaTypealiasKotlinAnnotationImpl") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.common.antlrtree.txt new file mode 100644 index 000000000..e548f108d --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.common.antlrtree.txt @@ -0,0 +1,368 @@ +File: skippedAnnotations.common.kt - 6ea60da9f1d2d8304db8021e9f44241a + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("kotlin") + semi + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalMultiplatform") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("OptionalExpectation") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("OptionalExpectationOnExpectOnly") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RequiresOptIn") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyOptIn") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("SinceKotlin") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.8") + QUOTE_CLOSE(""") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Deprecated") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("message") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Some text") + QUOTE_CLOSE(""") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("DeprecatedSinceKotlin") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.8") + QUOTE_CLOSE(""") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INVISIBLE_REFERENCE") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INVISIBLE_MEMBER") + QUOTE_CLOSE(""") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("MyOptIn") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("WasExperimental") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyOptIn") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + INTERNAL("internal") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("RequireKotlin") + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("version") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("1.8") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("skippedAnnotationsOnExpectOnly") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.jvm.antlrtree.txt new file mode 100644 index 000000000..1d5348783 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/skippedAnnotations.jvm.antlrtree.txt @@ -0,0 +1,82 @@ +File: skippedAnnotations.jvm.kt - d2e10abbe62e1972269f159c42ad7297 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("kotlin") + semi + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalMultiplatform") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("OptionalExpectationOnExpectOnly") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("skippedAnnotationsOnExpectOnly") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.common.antlrtree.txt new file mode 100644 index 000000000..fa82ac8fb --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.common.antlrtree.txt @@ -0,0 +1,127 @@ +File: sourceRetentionAnnotationsWhenTypealias.common.kt - d7f5f05dcc31ebddd1dd8f88fa1fe1f9 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("SOURCE") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("SourceAvailable") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("FromLib") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.jvm.antlrtree.txt new file mode 100644 index 000000000..a39075d32 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.jvm.antlrtree.txt @@ -0,0 +1,77 @@ +File: sourceRetentionAnnotationsWhenTypealias.jvm.kt - c42cafc772ae3472b2c70e55009c2fcb + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SourceAvailableImpl") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("SourceAvailable") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SourceAvailableImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("FromLib") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("SinceKotlin") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.common.antlrtree.txt new file mode 100644 index 000000000..6be86f67b --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.common.antlrtree.txt @@ -0,0 +1,124 @@ +File: typealias.common.kt - 83ece9a759918d268547dfd3643b3127 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPEALIAS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + RPAREN(")") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("KtTypealiasNotMatch") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("AnnotationsNotConsideredOnTypealias") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.jvm.antlrtree.txt new file mode 100644 index 000000000..3a2f4b7dd --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealias.jvm.antlrtree.txt @@ -0,0 +1,69 @@ +File: typealias.jvm.kt - f4bbd7c066af8e850a9389f0ec101b88 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("KtTypealiasNotMatchImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("KtTypealiasNotMatch") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KtTypealiasNotMatchImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("AnnotationsNotConsideredOnTypealiasImpl") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AnnotationsNotConsideredOnTypealias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AnnotationsNotConsideredOnTypealiasImpl") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.common.antlrtree.txt new file mode 100644 index 000000000..04dde8fb5 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.common.antlrtree.txt @@ -0,0 +1,112 @@ +File: typealiasToJavaLibrary.common.kt - 982829fec1a5edaf10f025874ff41176 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("SOURCE") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyDeprecatedNotMatch") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Retention") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationRetention") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("RUNTIME") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyDeprecatedMatch") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.jvm.antlrtree.txt new file mode 100644 index 000000000..ec52a206e --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToJavaLibrary.jvm.antlrtree.txt @@ -0,0 +1,59 @@ +File: typealiasToJavaLibrary.jvm.kt - 97ad36fc5e7fae864e07ac3ade9bbd98 + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("MyDeprecatedNotMatch") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("java") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("lang") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Deprecated") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("MyDeprecatedMatch") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("java") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("lang") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Deprecated") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.common.antlrtree.txt new file mode 100644 index 000000000..7fc9e7dc8 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.common.antlrtree.txt @@ -0,0 +1,626 @@ +File: typealiasToKtLibrary.common.kt - cb2569ef1899a73d0085042158840e11 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ANNOTATION_CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CONSTRUCTOR") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY_SETTER") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY_GETTER") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPEALIAS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPE") + COMMA(",") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyDeprecatedNotMatch") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Target") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("FUNCTION") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ANNOTATION_CLASS") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("CONSTRUCTOR") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY_SETTER") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("PROPERTY_GETTER") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AnnotationTarget") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("TYPEALIAS") + RPAREN(")") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyDeprecatedMatch") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("MyAbstractIterator") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("something") + QUOTE_CLOSE(""") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("complex") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("hasNext") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.jvm.antlrtree.txt new file mode 100644 index 000000000..5e2d99746 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/typealiasToKtLibrary.jvm.antlrtree.txt @@ -0,0 +1,87 @@ +File: typealiasToKtLibrary.jvm.kt - ff48e65ee0c28f47ba998486da4c3407 + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("MyDeprecatedNotMatch") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Deprecated") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("MyDeprecatedMatch") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Deprecated") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("MyAbstractIterator") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AbstractIterator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.common.antlrtree.txt new file mode 100644 index 000000000..26454ae3b --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.common.antlrtree.txt @@ -0,0 +1,107 @@ +File: withOtherIncomatibilities.common.kt - 62ae1db1f59512c72d95aeca51679653 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + functionModifier + INLINE("inline") + FUN("fun") + simpleIdentifier + Identifier("hasWeakIncompatibility") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + NL("\n") + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("hasStrongIncompatibility") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("hasStrongIncompatibility") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.jvm.antlrtree.txt new file mode 100644 index 000000000..8f2bd885d --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/annotationMatching/withOtherIncomatibilities.jvm.antlrtree.txt @@ -0,0 +1,91 @@ +File: withOtherIncomatibilities.jvm.kt - 9c9ee872966314dd65c198b4610301ed + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("hasWeakIncompatibility") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("hasStrongIncompatibility") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("hasStrongIncompatibility") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/checkNoActualForExpectInLastModule.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/checkNoActualForExpectInLastModule.jvm.antlrtree.txt new file mode 100644 index 000000000..54d9903f1 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/checkNoActualForExpectInLastModule.jvm.antlrtree.txt @@ -0,0 +1,16 @@ +File: checkNoActualForExpectInLastModule.jvm.kt - 51ca57dd09db19c8a795f19c39a20832 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.common.antlrtree.txt new file mode 100644 index 000000000..3ae7c1a8d --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.common.antlrtree.txt @@ -0,0 +1,100 @@ +File: constructorDefaultArgsViaActualTypealias.common.kt - a13979556302c232eb0a59d7178f81f6 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("DefaultArgsInConstructor") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + COMMA(",") + classParameter + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + COMMA(",") + classParameter + simpleIdentifier + Identifier("p3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.jvm.antlrtree.txt new file mode 100644 index 000000000..42628bd3b --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/constructorDefaultArgsViaActualTypealias.jvm.antlrtree.txt @@ -0,0 +1,114 @@ +File: constructorDefaultArgsViaActualTypealias.jvm.kt - 3766e37392219f1811c6fe457b64f734 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DefaultArgsInConstructorImpl") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + COMMA(",") + classParameter + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + COMMA(",") + classParameter + simpleIdentifier + Identifier("p3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("DefaultArgsInConstructor") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DefaultArgsInConstructorImpl") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.common.antlrtree.txt new file mode 100644 index 000000000..e7134f309 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.common.antlrtree.txt @@ -0,0 +1,110 @@ +File: expectAnnotationAndInlineClassWithDefaultValue.common.kt - e1ec893dc3a95e7c3f49cd967edb43cb + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Measurement") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("iterations") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("Inline") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.jvm.antlrtree.txt new file mode 100644 index 000000000..4822eb2c9 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/expectAnnotationAndInlineClassWithDefaultValue.jvm.antlrtree.txt @@ -0,0 +1,131 @@ +File: expectAnnotationAndInlineClassWithDefaultValue.jvm.kt - 065d6a0f8861a65a2fc2ffc4ff254b4f + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Measurement") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + simpleIdentifier + Identifier("iterations") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("Inline") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Measurement") + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Inline") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.common.antlrtree.txt new file mode 100644 index 000000000..efd5d05ef --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.common.antlrtree.txt @@ -0,0 +1,332 @@ +File: methodDefaultArgsViaActualTypealias.common.kt - 0b498623b0c781ceb265c70381421610 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("methodWithDefaultArg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("WithDefaultArgFromSuper") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("methodWithDefaultArg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("WithIncompatibility") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("common") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.jvm.antlrtree.txt new file mode 100644 index 000000000..09d3487fb --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/methodDefaultArgsViaActualTypealias.jvm.antlrtree.txt @@ -0,0 +1,352 @@ +File: methodDefaultArgsViaActualTypealias.jvm.kt - 08186193c94ab163de4ec63527dbc810 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("AImpl") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("impl") + QUOTE_CLOSE(""") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("impl") + QUOTE_CLOSE(""") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("A") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("BImpl") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("impl") + QUOTE_CLOSE(""") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("B") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("WithDefaultArgFromSuperImpl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("methodWithDefaultArg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("WithDefaultArgFromSuper") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("WithDefaultArgFromSuperImpl") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("WithIncompatibilityImpl") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("WithIncompatibility") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("WithIncompatibilityImpl") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectAbstractToString.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectAbstractToString.common.antlrtree.txt new file mode 100644 index 000000000..c4036b7de --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectAbstractToString.common.antlrtree.txt @@ -0,0 +1,119 @@ +File: expectAbstractToString.common.kt - 57acc571d6992a086dd0d4842457b538 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("toString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("D") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectAbstractToString.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectAbstractToString.jvm.antlrtree.txt new file mode 100644 index 000000000..ce397b318 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectAbstractToString.jvm.antlrtree.txt @@ -0,0 +1,153 @@ +File: expectAbstractToString.jvm.kt - b2b715b73f16460b8800f1c584f31760 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("toString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("D") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectExternal.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectExternal.common.antlrtree.txt new file mode 100644 index 000000000..ef16e4ad5 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectExternal.common.antlrtree.txt @@ -0,0 +1,175 @@ +File: expectExternal.common.kt - 739458db357b8043f041413f9c8df58d + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + functionModifier + EXTERNAL("external") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + functionModifier + EXTERNAL("external") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("prop") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("getAndSet") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + modifiers + modifier + functionModifier + EXTERNAL("external") + GET("get") + NL("\n") + setter + modifiers + modifier + functionModifier + EXTERNAL("external") + SET("set") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + functionModifier + EXTERNAL("external") + modifier + platformModifier + EXPECT("expect") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("explicitGetter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + modifiers + modifier + functionModifier + EXTERNAL("external") + GET("get") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + functionModifier + EXTERNAL("external") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + EXTERNAL("external") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectExternal.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectExternal.jvm.antlrtree.txt new file mode 100644 index 000000000..f7776c5b8 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectExternal.jvm.antlrtree.txt @@ -0,0 +1,183 @@ +File: expectExternal.jvm.kt - 78c210ce18425a261c318f1571b5735c + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + EXTERNAL("external") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + EXTERNAL("external") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + EXTERNAL("external") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("prop") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("getAndSet") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + modifiers + modifier + functionModifier + EXTERNAL("external") + GET("get") + NL("\n") + setter + modifiers + modifier + functionModifier + EXTERNAL("external") + SET("set") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + EXTERNAL("external") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("explicitGetter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + modifiers + modifier + functionModifier + EXTERNAL("external") + GET("get") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + EXTERNAL("external") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + EXTERNAL("external") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.common.antlrtree.txt new file mode 100644 index 000000000..ffb876a2a --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.common.antlrtree.txt @@ -0,0 +1,117 @@ +File: expectOptInAnnotation.common.kt - 3da09c6b96cd61902f1937cd94aa71d4 + fileAnnotation + AT_NO_WS("@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalMultiplatform") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ActualOnly") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RequiresOptIn") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Both") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RequiresOptIn") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("OptionalExpectation") + NL("\n") + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyOptIn") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.jvm.antlrtree.txt new file mode 100644 index 000000000..f8c116f53 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectOptInAnnotation.jvm.antlrtree.txt @@ -0,0 +1,76 @@ +File: expectOptInAnnotation.jvm.kt - 161d51f2d07380d8941421d086a317cc + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RequiresOptIn") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ActualOnly") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RequiresOptIn") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Both") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("RequiresOptIn") + NL("\n") + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("MyOptIn") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectTailrec.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectTailrec.common.antlrtree.txt new file mode 100644 index 000000000..0b8111ae5 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectTailrec.common.antlrtree.txt @@ -0,0 +1,178 @@ +File: expectTailrec.common.kt - cb665cc8ac439159e66826a375083b52 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + functionModifier + TAILREC("tailrec") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + functionModifier + TAILREC("tailrec") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("notReport") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + TAILREC("tailrec") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/expectTailrec.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/expectTailrec.jvm.antlrtree.txt new file mode 100644 index 000000000..af50d20f3 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/expectTailrec.jvm.antlrtree.txt @@ -0,0 +1,385 @@ +File: expectTailrec.jvm.kt - 551d1b9b3ab8cc791b5f8bee1681ccf0 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + TAILREC("tailrec") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + TAILREC("tailrec") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("notReport") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + TAILREC("tailrec") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + functionModifier + TAILREC("tailrec") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.common.antlrtree.txt new file mode 100644 index 000000000..63e2ab9ec --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.common.antlrtree.txt @@ -0,0 +1,38 @@ +File: actualMethodInExpectClass.common.kt - 83dd3fbc4ea828a5873469fc8c6cef54 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.jvm.antlrtree.txt new file mode 100644 index 000000000..fbe8efbd2 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/headerClass/actualMethodInExpectClass.jvm.antlrtree.txt @@ -0,0 +1,41 @@ +File: actualMethodInExpectClass.jvm.kt - a75bb587ecec9e5083dc005c5d5389a2 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.common.antlrtree.txt new file mode 100644 index 000000000..4feae8e06 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.common.antlrtree.txt @@ -0,0 +1,215 @@ +File: expectFunInterface.common.kt - a500ec50e129637011a5a4835e8b94f4 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F3") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("F4") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F5") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F6") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F7") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.main.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.main.antlrtree.txt new file mode 100644 index 000000000..fc8803e7f --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/headerClass/expectFunInterface.main.antlrtree.txt @@ -0,0 +1,243 @@ +File: expectFunInterface.main.kt - 4da47a0866c3098059dfcf34ba6d64a8 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("F2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("F3") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("java") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("lang") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Runnable") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F4") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("F5Typealias") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("F5") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F5Typealias") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("F6Typealias") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("F6") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F6Typealias") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("F7") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NotSam") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/intermediateActualHasAdditionalSupertypes.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/intermediateActualHasAdditionalSupertypes.antlrtree.txt new file mode 100644 index 000000000..2c8362f02 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/intermediateActualHasAdditionalSupertypes.antlrtree.txt @@ -0,0 +1,340 @@ +File: intermediateActualHasAdditionalSupertypes.kt - 85187ba81af669aad5ef35e4fefcb4b0 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CompletionHandler") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("CompletionHandlerBase") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("invokeOnCompletion") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("handler") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CompletionHandler") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("CompletionHandlerBase") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("CompletionHandler") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("cancelFutureOnCompletionAlt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("handlerBase") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CompletionHandlerBase") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("invokeOnCompletion") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("handlerBase") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("handlerBase") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("cancelFutureOnCompletion") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("handlerBase") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CompletionHandlerBase") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("invokeOnCompletion") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("handlerBase") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("handlerBase") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/kt-55570.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/kt-55570.antlrtree.txt new file mode 100644 index 000000000..1894c09a6 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/kt-55570.antlrtree.txt @@ -0,0 +1,21 @@ +File: kt-55570.kt - 2df8ad4c913507612ebefb37f75e4b85 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringDemoInterface.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringDemoInterface.antlrtree.txt new file mode 100644 index 000000000..f7f0370ea --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringDemoInterface.antlrtree.txt @@ -0,0 +1,131 @@ +File: kt57320.StringDemoInterface.kt - 1b788b5f118021ba8836d29626cfd1ba + packageHeader + importList + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("StringDemoInterface") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KotlinXStringDemoInterface") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("StringDemoInterface") + DOT(".") + simpleIdentifier + Identifier("plusK") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("StringValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("plus") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("K") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringValue.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringValue.antlrtree.txt new file mode 100644 index 000000000..1da010dec --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.StringValue.antlrtree.txt @@ -0,0 +1,128 @@ +File: kt57320.StringValue.kt - a8c9b846322a4f0ba0647a4dfa528468 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("StringValue") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("StringValue") + DOT(".") + simpleIdentifier + Identifier("plus") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("StringValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.main.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.main.antlrtree.txt new file mode 100644 index 000000000..dec801ccf --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/kt57320.main.antlrtree.txt @@ -0,0 +1,110 @@ +File: kt57320.main.kt - 4f0cf0ae1b4021768f393ba94f0d2c4d + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("StringDemo") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("StringDemoInterface") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("StringDemo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("O") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("plusK") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModule.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModule.antlrtree.txt new file mode 100644 index 000000000..f494a172b --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModule.antlrtree.txt @@ -0,0 +1,825 @@ +File: expectAndActualInTheSameModule.kt - 33509de7d045852f271db94dfd3377e2 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("CommonClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("memberFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Nested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("CommonClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("memberFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("Nested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("commonFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("commonFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("commonProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("commonProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("IntermediateClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("memberFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Nested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("IntermediateClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("memberFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("Nested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("intermediateFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("intermediateFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("intermediateProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("intermediateProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("PlatformClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("memberFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Nested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("PlatformClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("memberFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("memberProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("Nested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("platformFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("platformFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("platformProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("platformProperty") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModuleIncompatibilities.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModuleIncompatibilities.antlrtree.txt new file mode 100644 index 000000000..e1ac16d6b --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/expectAndActualInTheSameModuleIncompatibilities.antlrtree.txt @@ -0,0 +1,457 @@ +File: expectAndActualInTheSameModuleIncompatibilities.kt - 326e7c7733818f92dc29d56d21e83ce1 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("parameterCount") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("parameterCount") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("parameterCount2") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("parameterCount2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("callableKind") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("callableKind") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("typeParameterCount") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("typeParameterCount") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumEntries") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("ONE") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("TWO") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumEntries") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("ONE") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + VARARG("vararg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + VARARG("vararg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("parameterCount") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("typeParameterCount") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("callableKind") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + VARARG("vararg") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.antlrtree.txt new file mode 100644 index 000000000..79e0769e8 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.antlrtree.txt @@ -0,0 +1,85 @@ +File: intermediateWithActualAndExpect.kt - cc292c87f7746875840366c3526499bc + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("C") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("C") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt new file mode 100644 index 000000000..2e61861a8 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt @@ -0,0 +1,142 @@ +File: sealedInheritorsInComplexModuleStructure.kt - 4c1e81cd4113a2af8a8293a0b1270394 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("foo") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("SealedWithSharedActual") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("SealedWithPlatformActuals") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("SealedWithSharedActual") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + PACKAGE("package") + Identifier("foo") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("SealedWithSharedActual") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SimpleShared") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("SealedWithPlatformActuals") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + PACKAGE("package") + Identifier("foo") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("SealedWithPlatformActuals") + primaryConstructor + modifiers + modifier + platformModifier + ACTUAL("actual") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("SealedWithSharedActual") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/incDecOperatorsInExpectClass.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/incDecOperatorsInExpectClass.antlrtree.txt new file mode 100644 index 000000000..21bc5d8cc --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/incDecOperatorsInExpectClass.antlrtree.txt @@ -0,0 +1,91 @@ +File: incDecOperatorsInExpectClass.kt - a0bb5ba6b8c11069833db22299d908fa + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("Counter") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("inc") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Counter") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("dec") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Counter") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Counter") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationAllowed.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationAllowed.common.antlrtree.txt new file mode 100644 index 000000000..ec767a7f7 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationAllowed.common.antlrtree.txt @@ -0,0 +1,97 @@ +File: implicitJavaActualizationAllowed.common.kt - fbdd9d07260db0afc7366b8a658a0d9b + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("jvm") + DOT(".") + simpleIdentifier + Identifier("ImplicitlyActualizedByJvmDeclaration") + semi + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalMultiplatform") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ImplicitlyActualizedByJvmDeclaration") + NL("\n") + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationDisallowed.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationDisallowed.common.antlrtree.txt new file mode 100644 index 000000000..87adcdad6 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualizationDisallowed.common.antlrtree.txt @@ -0,0 +1,38 @@ +File: implicitJavaActualizationDisallowed.common.kt - 56c4dc4c7272969847f72320c125b0e1 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.common.antlrtree.txt new file mode 100644 index 000000000..aa2d7aa30 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.common.antlrtree.txt @@ -0,0 +1,48 @@ +File: implicitJavaActualization_multipleActuals.common.kt - c92ed80f274739a1f130713136b0c87a + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.jvm.antlrtree.txt new file mode 100644 index 000000000..589552dd6 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/java/implicitJavaActualization_multipleActuals.jvm.antlrtree.txt @@ -0,0 +1,53 @@ +File: implicitJavaActualization_multipleActuals.jvm.kt - ae4cfaecee9279334aa6be5a48277113 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.common.antlrtree.txt new file mode 100644 index 000000000..8ee50e4df --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.common.antlrtree.txt @@ -0,0 +1,1550 @@ +File: inheritedJavaMembers.common.kt - ca7678124e385e04898bfaf2cf1c00b7 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MutableListEx") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MutableList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("removeRange") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fromIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("toIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FastArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("addAll") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("elements") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("setAddAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FastArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("offset") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("elements") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + additiveOperator + SUB("-") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("offset") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("setAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FastArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("offset") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("elements") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + additiveOperator + SUB("-") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("offset") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FastArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("offset") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("elements") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + additiveOperator + SUB("-") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("offset") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("removeToSize") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("FastArrayList") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MutableListEx") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("RandomAccess") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("initialCapacity") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("trimToSize") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("removeRange") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fromIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("toIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("ensureCapacity") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("minCapacity") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("isEmpty") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("contains") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("containsAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + GET("get") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("indexOf") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("lastIndexOf") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("iterator") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableIterator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("add") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("remove") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("removeAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("retainAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("clear") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + SET("set") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("add") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("removeAt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("listIterator") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableListIterator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("listIterator") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableListIterator") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("subList") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fromIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("toIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.jvm.antlrtree.txt new file mode 100644 index 000000000..ac7c30d6c --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/java/inheritedJavaMembers.jvm.antlrtree.txt @@ -0,0 +1,1566 @@ +File: inheritedJavaMembers.jvm.kt - b9f35fe6255efa694de464c7f7ec9c10 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("FastArrayList") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + primaryConstructor + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + VAR("var") + simpleIdentifier + Identifier("array") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + COMMA(",") + classParameter + VAR("var") + simpleIdentifier + Identifier("_size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("array") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + COMMA(",") + classParameter + VAR("var") + simpleIdentifier + Identifier("arrayCapacity") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("array") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("size") + COMMA(",") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("AbstractMutableList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MutableListEx") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("RandomAccess") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayOfNulls") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("16") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + secondaryConstructor + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("initialCapacity") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arrayOfNulls") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("initialCapacity") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + secondaryConstructor + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("elements") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toTypedArray") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("trimToSize") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("ensureCapacity") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("minCapacity") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_size") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("UNCHECKED_CAST") + QUOTE_CLOSE(""") + RPAREN(")") + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + GET("get") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("array") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + SET("set") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("element") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("add") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("add") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Collection") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("remove") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("UNCHECKED_CAST") + QUOTE_CLOSE(""") + RPAREN(")") + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("removeAt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("array") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("removeRange") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fromIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("toIndex") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("setAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("index") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FastArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("offset") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("addAll") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("elements") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("FastArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("offset") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("size") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("clear") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("contains") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("indexOf") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("lastIndexOf") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/kt54827.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/kt54827.common.antlrtree.txt new file mode 100644 index 000000000..7dc1ebd49 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/kt54827.common.antlrtree.txt @@ -0,0 +1,40 @@ +File: kt54827.common.kt - 05ce19a94c3d889c95f4fb0949313ec7 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("SomeClass") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/kt54827.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/kt54827.jvm.antlrtree.txt new file mode 100644 index 000000000..ee3957c24 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/kt54827.jvm.antlrtree.txt @@ -0,0 +1,41 @@ +File: kt54827.jvm.kt - 0861120cb9c4f1d95f0d71ab1ebc2d6f + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("SomeClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/kt58153.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/kt58153.common.antlrtree.txt new file mode 100644 index 000000000..ae997f9d6 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/kt58153.common.antlrtree.txt @@ -0,0 +1,95 @@ +File: kt58153.common.kt - 1642f4a5b4d7dc249a240969480dbbc8 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("LockFreeLinkedListNode") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("NodeList") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("LockFreeLinkedListNode") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("toString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/kt58153.platform.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/kt58153.platform.antlrtree.txt new file mode 100644 index 000000000..b3974743e --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/kt58153.platform.antlrtree.txt @@ -0,0 +1,66 @@ +File: kt58153.platform.kt - 88777145dc9ef8a06058aac179f47162 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("LockFreeLinkedListNode") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("toString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.common.antlrtree.txt new file mode 100644 index 000000000..8e0429485 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.common.antlrtree.txt @@ -0,0 +1,162 @@ +File: manyImplMemberNotImplemented.common.kt - 5b6b8b29bf93233bd197ed85992aaf52 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C1") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("I1") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C1") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I1") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C1") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C2") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("I2") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C2") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I2") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.main.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.main.antlrtree.txt new file mode 100644 index 000000000..985582671 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/manyImplMemberNotImplemented.main.antlrtree.txt @@ -0,0 +1,149 @@ +File: manyImplMemberNotImplemented.main.kt - f6cf63094998ebff4111297274927285 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("I1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C2") + primaryConstructor + modifiers + modifier + platformModifier + ACTUAL("actual") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("I2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.common.antlrtree.txt new file mode 100644 index 000000000..a076ce8db --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.common.antlrtree.txt @@ -0,0 +1,80 @@ +File: manyInterfacesMemberNotImplemented.common.kt - bfc8cbae53f2812b61add30ec10c20df + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("S1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("S2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("S1") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("S2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.main.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.main.antlrtree.txt new file mode 100644 index 000000000..493605252 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/manyInterfacesMemberNotImplemented.main.antlrtree.txt @@ -0,0 +1,71 @@ +File: manyInterfacesMemberNotImplemented.main.kt - d2a787840e9bbebd0214760b00cdc022 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("S1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("S2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.common.antlrtree.txt new file mode 100644 index 000000000..dc091c2a1 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.common.antlrtree.txt @@ -0,0 +1,119 @@ +File: multipleExpectInterfacesImplementation.common.kt - 82817c3327393bf9d59df77cee7e3643 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("ByteChannel") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ByteReadChannel") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("ByteWriteChannel") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("ByteReadChannel") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("isClosedForWrite") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + INTERFACE("interface") + simpleIdentifier + Identifier("ByteWriteChannel") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("isClosedForWrite") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.platform.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.platform.antlrtree.txt new file mode 100644 index 000000000..ce0684ea1 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/multipleExpectInterfacesImplementation.platform.antlrtree.txt @@ -0,0 +1,107 @@ +File: multipleExpectInterfacesImplementation.platform.kt - e25609d08212c3555036c4ffd584298c + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("ByteReadChannel") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("isClosedForWrite") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + INTERFACE("interface") + simpleIdentifier + Identifier("ByteWriteChannel") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("isClosedForWrite") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.common.antlrtree.txt new file mode 100644 index 000000000..4d3016024 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.common.antlrtree.txt @@ -0,0 +1,30 @@ +File: sealedClassWithPrivateConstructor.common.kt - 2bf9d6d165b3e71d17f232e6b8c0f7a0 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("Frame") + primaryConstructor + modifiers + modifier + visibilityModifier + PRIVATE("private") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.jvm.antlrtree.txt new file mode 100644 index 000000000..68901f803 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/sealedClassWithPrivateConstructor.jvm.antlrtree.txt @@ -0,0 +1,28 @@ +File: sealedClassWithPrivateConstructor.jvm.kt - 155d31f2f4f219dfe4e83e821a318a77 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("Frame") + primaryConstructor + modifiers + modifier + platformModifier + ACTUAL("actual") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/supertypeActualizationWithAny.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/supertypeActualizationWithAny.antlrtree.txt new file mode 100644 index 000000000..bdcecb833 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/supertypeActualizationWithAny.antlrtree.txt @@ -0,0 +1,74 @@ +File: supertypeActualizationWithAny.kt - 7d834bb3adf85b300b3c9b47d6df06c9 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("A") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("B") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/varSetterVisibility.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/varSetterVisibility.common.antlrtree.txt new file mode 100644 index 000000000..7fdefcdff --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/varSetterVisibility.common.antlrtree.txt @@ -0,0 +1,153 @@ +File: varSetterVisibility.common.kt - 32f8de15ef5269cacade0cf37853d525 + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + setter + modifiers + modifier + visibilityModifier + INTERNAL("internal") + SET("set") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + setter + modifiers + modifier + visibilityModifier + INTERNAL("internal") + SET("set") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/varSetterVisibility.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/varSetterVisibility.jvm.antlrtree.txt new file mode 100644 index 000000000..8bd852388 --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/varSetterVisibility.jvm.antlrtree.txt @@ -0,0 +1,283 @@ +File: varSetterVisibility.jvm.kt - 2995917249a658290e71af30b1d85464 + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("v3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + setter + modifiers + modifier + visibilityModifier + PROTECTED("protected") + SET("set") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C2Typealias") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + NL("\n") + setter + modifiers + modifier + visibilityModifier + PROTECTED("protected") + SET("set") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("C2") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C2Typealias") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/widerVisibilityInActualClassifier.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/widerVisibilityInActualClassifier.antlrtree.txt new file mode 100644 index 000000000..d2eb5f5af --- /dev/null +++ b/grammar/testData/diagnostics/multiplatform/widerVisibilityInActualClassifier.antlrtree.txt @@ -0,0 +1,336 @@ +File: widerVisibilityInActualClassifier.kt - 98a6e0e287e2e8d64e871a1be94230a2 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Some") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + CLASS("class") + simpleIdentifier + Identifier("ProtectedNested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("InternalNested") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("publicFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("internalFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("protectedFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Other") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + CLASS("class") + simpleIdentifier + Identifier("ProtectedNested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("InternalNested") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Some") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("ProtectedNested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("InternalNested") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("publicFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("internalFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("protectedFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("PlatformOther") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("ProtectedNested") + semis + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + CLASS("class") + simpleIdentifier + Identifier("InternalNested") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("Other") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("PlatformOther") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/namedArguments/disallowForDelegationToJavaMethods.1.antlrtree.txt b/grammar/testData/diagnostics/namedArguments/disallowForDelegationToJavaMethods.1.antlrtree.txt new file mode 100644 index 000000000..9218eb6bf --- /dev/null +++ b/grammar/testData/diagnostics/namedArguments/disallowForDelegationToJavaMethods.1.antlrtree.txt @@ -0,0 +1,150 @@ +File: disallowForDelegationToJavaMethods.1.kt - 22a2967ad493b41fda311c74b61c13e9 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("KtClass") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("JavaInterface") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaSuperClass") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ktInstance") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("KtClass") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ktInstance") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("javaName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/namedArguments/disallowForFunctionTypes.antlrtree.txt b/grammar/testData/diagnostics/namedArguments/disallowForFunctionTypes.antlrtree.txt new file mode 100644 index 000000000..d8d2d5574 --- /dev/null +++ b/grammar/testData/diagnostics/namedArguments/disallowForFunctionTypes.antlrtree.txt @@ -0,0 +1,97 @@ +File: disallowForFunctionTypes.kt - b473795b5a255cd44bcc3a865954e368 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("p1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/noLibraryProvidersDuplication.antlrtree.txt b/grammar/testData/diagnostics/noLibraryProvidersDuplication.antlrtree.txt new file mode 100644 index 000000000..8a8eab583 --- /dev/null +++ b/grammar/testData/diagnostics/noLibraryProvidersDuplication.antlrtree.txt @@ -0,0 +1,193 @@ +File: noLibraryProvidersDuplication.kt - f905c7d3e383c24215045e743ffbc7aa + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("nullIfEmpty") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("isNotEmpty") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/noLibraryProvidersDuplicationWithMpp.antlrtree.txt b/grammar/testData/diagnostics/noLibraryProvidersDuplicationWithMpp.antlrtree.txt new file mode 100644 index 000000000..15f894e49 --- /dev/null +++ b/grammar/testData/diagnostics/noLibraryProvidersDuplicationWithMpp.antlrtree.txt @@ -0,0 +1,196 @@ +File: noLibraryProvidersDuplicationWithMpp.kt - b8a7643a01c4da54be1bf53b555faa64 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("nullIfEmpty") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("isNotEmpty") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/noSymbolProvidersDuplicationInDiamond.antlrtree.txt b/grammar/testData/diagnostics/noSymbolProvidersDuplicationInDiamond.antlrtree.txt new file mode 100644 index 000000000..acfc305ef --- /dev/null +++ b/grammar/testData/diagnostics/noSymbolProvidersDuplicationInDiamond.antlrtree.txt @@ -0,0 +1,88 @@ +File: noSymbolProvidersDuplicationInDiamond.kt - 8dfcf74794648f55f8c8c052bfab2083 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("g0") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("g0") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/noUnusedOnDelegationWithProvider.antlrtree.txt b/grammar/testData/diagnostics/noUnusedOnDelegationWithProvider.antlrtree.txt new file mode 100644 index 000000000..f719b1820 --- /dev/null +++ b/grammar/testData/diagnostics/noUnusedOnDelegationWithProvider.antlrtree.txt @@ -0,0 +1,459 @@ +File: noUnusedOnDelegationWithProvider.kt - fd3f344a4afccff3e45619acb252a122 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Example") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("valProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("varProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("valVariable") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("varVariable") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Delegate") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("delegation") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("provideDelegate") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Delegate") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/nullableTypes/kt58844.antlrtree.txt b/grammar/testData/diagnostics/nullableTypes/kt58844.antlrtree.txt new file mode 100644 index 000000000..37083c951 --- /dev/null +++ b/grammar/testData/diagnostics/nullableTypes/kt58844.antlrtree.txt @@ -0,0 +1,292 @@ +File: kt58844.kt - b373cad457ffb3f14a97b85d276d428b + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("intFun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("byteFun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("args") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("intVar") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("byteVar") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intFun") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intVar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("toInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("byteFun") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("byteVar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("toByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/nullableTypes/notUselessComparasionAfterSmartcast.antlrtree.txt b/grammar/testData/diagnostics/nullableTypes/notUselessComparasionAfterSmartcast.antlrtree.txt new file mode 100644 index 000000000..5f9c017f7 --- /dev/null +++ b/grammar/testData/diagnostics/nullableTypes/notUselessComparasionAfterSmartcast.antlrtree.txt @@ -0,0 +1,399 @@ +File: notUselessComparasionAfterSmartcast.kt - 281731f23c2f3fb3260596b7dd062321 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + DISJ("||") + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("foo") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("abc") + QUOTE_CLOSE(""") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + DISJ("||") + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/numbers/integerLiteralWillChangeResolveInFunctionReturnPosition.antlrtree.txt b/grammar/testData/diagnostics/numbers/integerLiteralWillChangeResolveInFunctionReturnPosition.antlrtree.txt new file mode 100644 index 000000000..f04798304 --- /dev/null +++ b/grammar/testData/diagnostics/numbers/integerLiteralWillChangeResolveInFunctionReturnPosition.antlrtree.txt @@ -0,0 +1,612 @@ +File: integerLiteralWillChangeResolveInFunctionReturnPosition.kt - 47388ad56ab86e62b39d76a62678b112 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_0") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_5") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_6") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("runWithByte") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + simpleIdentifier + Identifier("run") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("runWithByte") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/numbers/kt45970.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt45970.antlrtree.txt new file mode 100644 index 000000000..d288a77c2 --- /dev/null +++ b/grammar/testData/diagnostics/numbers/kt45970.antlrtree.txt @@ -0,0 +1,1904 @@ +File: kt45970.kt - cb77b8faadc1bf47a0c0c07e3e10d7db + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("g_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("g_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("h_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("h_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("local") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("g_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("g_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("h_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("h_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Member") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("f_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("g_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("g_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("h_1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("h_2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/numbers/kt48361.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt48361.antlrtree.txt new file mode 100644 index 000000000..26a9e26a1 --- /dev/null +++ b/grammar/testData/diagnostics/numbers/kt48361.antlrtree.txt @@ -0,0 +1,115 @@ +File: kt48361.kt - 36a82e37354a7fc6a24959c9290c54e0 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("ttlMillis") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + multiplicativeOperator + MULT("*") + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("60") + multiplicativeOperator + MULT("*") + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1000") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("cacheSize") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4096") + multiplicativeOperator + MULT("*") + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/operatorsOverloading/EqualsOperatorOverrideHierarchies.antlrtree.txt b/grammar/testData/diagnostics/operatorsOverloading/EqualsOperatorOverrideHierarchies.antlrtree.txt new file mode 100644 index 000000000..ddd9996e3 --- /dev/null +++ b/grammar/testData/diagnostics/operatorsOverloading/EqualsOperatorOverrideHierarchies.antlrtree.txt @@ -0,0 +1,670 @@ +File: EqualsOperatorOverrideHierarchies.kt - ee8dccc3ee653564f9e579b7f91ca6cb + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Parent") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("OperatorParent") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Parent") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OperatorParent") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Parent") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("D") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OperatorParent") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.main.antlrtree.txt b/grammar/testData/diagnostics/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.main.antlrtree.txt new file mode 100644 index 000000000..c57f51921 --- /dev/null +++ b/grammar/testData/diagnostics/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.main.antlrtree.txt @@ -0,0 +1,93 @@ +File: augmentedAssignForJavaSyntheticProperty.main.kt - 1bdf0392f046f1d74ec77d0b039a28ee + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("dependsOn") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/overload/doubleWinsOverFloat.antlrtree.txt b/grammar/testData/diagnostics/overload/doubleWinsOverFloat.antlrtree.txt new file mode 100644 index 000000000..60e394df1 --- /dev/null +++ b/grammar/testData/diagnostics/overload/doubleWinsOverFloat.antlrtree.txt @@ -0,0 +1,349 @@ +File: doubleWinsOverFloat.kt - 212a501df8f2b247896834bf599897d5 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Float") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + DOT(".") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Float") + DOT(".") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Float") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/overload/lambdasWithDifferentParameterNumber.antlrtree.txt b/grammar/testData/diagnostics/overload/lambdasWithDifferentParameterNumber.antlrtree.txt new file mode 100644 index 000000000..00b3b01f0 --- /dev/null +++ b/grammar/testData/diagnostics/overload/lambdasWithDifferentParameterNumber.antlrtree.txt @@ -0,0 +1,252 @@ +File: lambdasWithDifferentParameterNumber.kt - 0e51aaab49191dd2d2b9e91923167443 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("g") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClass.antlrtree.txt b/grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClass.antlrtree.txt new file mode 100644 index 000000000..694bd039d --- /dev/null +++ b/grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClass.antlrtree.txt @@ -0,0 +1,422 @@ +File: overloadsFromCurrentAndSuperClass.kt - e0d0caded46c2309e94874a12df815fc + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClassWithReturnType.antlrtree.txt b/grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClassWithReturnType.antlrtree.txt new file mode 100644 index 000000000..23a335644 --- /dev/null +++ b/grammar/testData/diagnostics/overload/overloadsFromCurrentAndSuperClassWithReturnType.antlrtree.txt @@ -0,0 +1,411 @@ +File: overloadsFromCurrentAndSuperClassWithReturnType.kt - ca049cb24f81ad0f3615a4a944983da1 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/InheritingJavaClassWithRawTypeInOverrideSignature.Main.antlrtree.txt b/grammar/testData/diagnostics/override/InheritingJavaClassWithRawTypeInOverrideSignature.Main.antlrtree.txt new file mode 100644 index 000000000..c8ade183f --- /dev/null +++ b/grammar/testData/diagnostics/override/InheritingJavaClassWithRawTypeInOverrideSignature.Main.antlrtree.txt @@ -0,0 +1,24 @@ +File: InheritingJavaClassWithRawTypeInOverrideSignature.Main.kt - d6e4930433a8be2c350b356ea426819a + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("X") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/InternalPotentialOverride.A.antlrtree.txt b/grammar/testData/diagnostics/override/InternalPotentialOverride.A.antlrtree.txt new file mode 100644 index 000000000..d2b62491e --- /dev/null +++ b/grammar/testData/diagnostics/override/InternalPotentialOverride.A.antlrtree.txt @@ -0,0 +1,141 @@ +File: InternalPotentialOverride.A.kt - 0b9204d407a2e10386ac95518294ac42 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("AG") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/InternalPotentialOverride.B.antlrtree.txt b/grammar/testData/diagnostics/override/InternalPotentialOverride.B.antlrtree.txt new file mode 100644 index 000000000..26d0f57a4 --- /dev/null +++ b/grammar/testData/diagnostics/override/InternalPotentialOverride.B.antlrtree.txt @@ -0,0 +1,147 @@ +File: InternalPotentialOverride.B.kt - 3bd863fccb6039a77036d4eb3f955524 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("BG") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("AG") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/clashesOnInheritance/conflictingInherited.antlrtree.txt b/grammar/testData/diagnostics/override/clashesOnInheritance/conflictingInherited.antlrtree.txt new file mode 100644 index 000000000..4f52849e9 --- /dev/null +++ b/grammar/testData/diagnostics/override/clashesOnInheritance/conflictingInherited.antlrtree.txt @@ -0,0 +1,546 @@ +File: conflictingInherited.kt - 5cd12c869dcf1834b0cb7e511dadb1d8 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("some") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("some") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("text") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("X1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("X2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("X1") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("some") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("some") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("text") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("X3") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("B") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("X4") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("X3") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("some") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("X5") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("some") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("text") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("X6") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("X5") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/derivedClasses/Constructor.antlrtree.txt b/grammar/testData/diagnostics/override/derivedClasses/Constructor.antlrtree.txt new file mode 100644 index 000000000..a173f3b68 --- /dev/null +++ b/grammar/testData/diagnostics/override/derivedClasses/Constructor.antlrtree.txt @@ -0,0 +1,177 @@ +File: Constructor.kt - a9134d7ccfac3e6d4dc76273b5c43d77 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("item") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Bar") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("str") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("str") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("usage") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Bar") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/override/derivedClasses/DelegatedConstructor.antlrtree.txt b/grammar/testData/diagnostics/override/derivedClasses/DelegatedConstructor.antlrtree.txt new file mode 100644 index 000000000..891a8c32a --- /dev/null +++ b/grammar/testData/diagnostics/override/derivedClasses/DelegatedConstructor.antlrtree.txt @@ -0,0 +1,101 @@ +File: DelegatedConstructor.kt - 8646b4e76d27aa218030a369700c5e97 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("item") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Bar") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("str") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("str") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/derivedClasses/EnumValues.antlrtree.txt b/grammar/testData/diagnostics/override/derivedClasses/EnumValues.antlrtree.txt new file mode 100644 index 000000000..db5dcc8a5 --- /dev/null +++ b/grammar/testData/diagnostics/override/derivedClasses/EnumValues.antlrtree.txt @@ -0,0 +1,85 @@ +File: EnumValues.kt - 5de96ab05325f93aa7ab5598f7fa7dfa + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Direction") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("NORTH") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("EAST") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("SOUTH") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("WEST") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("usage") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Direction") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("values") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/override/derivedClasses/Instance.antlrtree.txt b/grammar/testData/diagnostics/override/derivedClasses/Instance.antlrtree.txt new file mode 100644 index 000000000..27275bd1c --- /dev/null +++ b/grammar/testData/diagnostics/override/derivedClasses/Instance.antlrtree.txt @@ -0,0 +1,120 @@ +File: Instance.kt - 5ca9a9ea04fbe581e8c0a3608076f31d + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Bar") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("usage") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Bar") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/override/derivedClasses/StaticFieldFromJava.k.antlrtree.txt b/grammar/testData/diagnostics/override/derivedClasses/StaticFieldFromJava.k.antlrtree.txt new file mode 100644 index 000000000..a7264af82 --- /dev/null +++ b/grammar/testData/diagnostics/override/derivedClasses/StaticFieldFromJava.k.antlrtree.txt @@ -0,0 +1,57 @@ +File: StaticFieldFromJava.k.kt - 9088a78685ae0a4002f149526359f727 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("J") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("J") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("OK") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/override/derivedClasses/StaticMethodFromJava.k.antlrtree.txt b/grammar/testData/diagnostics/override/derivedClasses/StaticMethodFromJava.k.antlrtree.txt new file mode 100644 index 000000000..a9e2659b9 --- /dev/null +++ b/grammar/testData/diagnostics/override/derivedClasses/StaticMethodFromJava.k.antlrtree.txt @@ -0,0 +1,85 @@ +File: StaticMethodFromJava.k.kt - 3ffbd7c01a376425ca40229543481bd0 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("Bar") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getValue") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("bar") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/override/diamondWithDiagonal.antlrtree.txt b/grammar/testData/diagnostics/override/diamondWithDiagonal.antlrtree.txt new file mode 100644 index 000000000..f239cb9e2 --- /dev/null +++ b/grammar/testData/diagnostics/override/diamondWithDiagonal.antlrtree.txt @@ -0,0 +1,211 @@ +File: diamondWithDiagonal.kt - 1f3d7f3372592e53c342c064ae17ed66 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("InterfaceWithDefault") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("hostKind") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("24") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("SubInterfaceWithoutDefault") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("InterfaceWithDefault") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("hostKind") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("ClassWithDefault") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("InterfaceWithDefault") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("hostKind") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("InheritsAll") + COLON(":") + NL("\n") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ClassWithDefault") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + NL("\n") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("SubInterfaceWithoutDefault") + COMMA(",") + NL("\n") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("InterfaceWithDefault") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/kt53408.antlrtree.txt b/grammar/testData/diagnostics/override/kt53408.antlrtree.txt new file mode 100644 index 000000000..76ea2d93b --- /dev/null +++ b/grammar/testData/diagnostics/override/kt53408.antlrtree.txt @@ -0,0 +1,201 @@ +File: kt53408.kt - 727d9ade6eab96de2a4292333728e875 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("D") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.CK.antlrtree.txt b/grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.CK.antlrtree.txt new file mode 100644 index 000000000..453354ed6 --- /dev/null +++ b/grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.CK.antlrtree.txt @@ -0,0 +1,21 @@ +File: manyImplFromOneJavaInterfaceWithDelegation.CK.kt - eeff3329c7871262b397fe129c635c05 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CK") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.test.antlrtree.txt b/grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.test.antlrtree.txt new file mode 100644 index 000000000..aa4de5f7e --- /dev/null +++ b/grammar/testData/diagnostics/override/manyImplFromOneJavaInterfaceWithDelegation.test.antlrtree.txt @@ -0,0 +1,298 @@ +File: manyImplFromOneJavaInterfaceWithDelegation.test.kt - 50a3a9f8170a74fdc716fe41bf66af60 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Adapter") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("C") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("D") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("adapter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Adapter") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("B") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("C") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("E") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("B") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("C") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("AdapterK") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("CK") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("F") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("adapter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AdapterK") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("B") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("CK") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.A.antlrtree.txt b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.A.antlrtree.txt new file mode 100644 index 000000000..1249c5388 --- /dev/null +++ b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.A.antlrtree.txt @@ -0,0 +1,34 @@ +File: manyImplFromOneKotlinInterfaceWithDelegation.A.kt - d14bc376dfcf5de6ad1711e53885f97a + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.B.antlrtree.txt b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.B.antlrtree.txt new file mode 100644 index 000000000..d98738cd8 --- /dev/null +++ b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.B.antlrtree.txt @@ -0,0 +1,21 @@ +File: manyImplFromOneKotlinInterfaceWithDelegation.B.kt - bb9c40ab0eb772469e3430aea239038b + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.C.antlrtree.txt b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.C.antlrtree.txt new file mode 100644 index 000000000..f8994878e --- /dev/null +++ b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.C.antlrtree.txt @@ -0,0 +1,21 @@ +File: manyImplFromOneKotlinInterfaceWithDelegation.C.kt - ca44d2270f5159fcec24e52160125612 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.test.antlrtree.txt b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.test.antlrtree.txt new file mode 100644 index 000000000..791c5efa3 --- /dev/null +++ b/grammar/testData/diagnostics/override/manyImplFromOneKotlinInterfaceWithDelegation.test.antlrtree.txt @@ -0,0 +1,209 @@ +File: manyImplFromOneKotlinInterfaceWithDelegation.test.kt - d915d1bc89b83779ee5966f911370931 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Adapter") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("C") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("D") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("adapter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Adapter") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("B") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("C") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("AdapterJ") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("BJ") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("C") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DJ") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("adapter") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AdapterJ") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("BJ") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("C") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("adapter") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/varImplementedByInheritedVal.antlrtree.txt b/grammar/testData/diagnostics/override/varImplementedByInheritedVal.antlrtree.txt new file mode 100644 index 000000000..bcc1e1221 --- /dev/null +++ b/grammar/testData/diagnostics/override/varImplementedByInheritedVal.antlrtree.txt @@ -0,0 +1,499 @@ +File: varImplementedByInheritedVal.kt - de6136d387f9a0d1688f46472cc1b277 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("IVal") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("IVar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("IVarDefault") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("CVal") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("default") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("CVar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("default") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVal") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C3") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVal") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C4") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVal") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C5") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVar") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C6") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVar") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C7") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVar") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C8") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("ival") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IVal") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("IVal") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ival") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/override/varImplementedByInheritedValError.antlrtree.txt b/grammar/testData/diagnostics/override/varImplementedByInheritedValError.antlrtree.txt new file mode 100644 index 000000000..e9efd34eb --- /dev/null +++ b/grammar/testData/diagnostics/override/varImplementedByInheritedValError.antlrtree.txt @@ -0,0 +1,499 @@ +File: varImplementedByInheritedValError.kt - dd1ecb3a68f252c5b59cb1a9a2847b4a + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("IVal") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("IVar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("IVarDefault") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("CVal") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("default") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("CVar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("default") + QUOTE_CLOSE(""") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVal") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C3") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVal") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C4") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVal") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C5") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVar") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C6") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVar") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C7") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("CVar") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVarDefault") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C8") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("ival") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IVal") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("IVar") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + explicitDelegation + userType + simpleUserType + simpleIdentifier + Identifier("IVal") + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ival") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/overrideNotNull_Fail.antlrtree.txt b/grammar/testData/diagnostics/overrideNotNull_Fail.antlrtree.txt new file mode 100644 index 000000000..04812f1b4 --- /dev/null +++ b/grammar/testData/diagnostics/overrideNotNull_Fail.antlrtree.txt @@ -0,0 +1,197 @@ +File: overrideNotNull_Fail.kt - f0d2cb7fa1c7cee484828e6c56596d85 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("io") + DOT(".") + simpleIdentifier + Identifier("File") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("AbstractFE1UastTest") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("testDataDir") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("File") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("parentFile") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Legacy") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("AbstractFE1UastTest") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("testDataDir") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("File") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("File") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("parentFile") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/overrideNotNull_Ok.antlrtree.txt b/grammar/testData/diagnostics/overrideNotNull_Ok.antlrtree.txt new file mode 100644 index 000000000..3822cb3fc --- /dev/null +++ b/grammar/testData/diagnostics/overrideNotNull_Ok.antlrtree.txt @@ -0,0 +1,200 @@ +File: overrideNotNull_Ok.kt - c7de83f756c19fe3a9787b8f2303ce08 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("io") + DOT(".") + simpleIdentifier + Identifier("File") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("AbstractFE1UastTest") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("testDataDir") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("File") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("parentFile") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Legacy") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("AbstractFE1UastTest") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("testDataDir") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("File") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("File") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("parentFile") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/javaMappedCtors.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/javaMappedCtors.antlrtree.txt new file mode 100644 index 000000000..727ef9aa4 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/javaMappedCtors.antlrtree.txt @@ -0,0 +1,871 @@ +File: javaMappedCtors.kt - 861631761d967c5dc014fa17f7d6496c + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ABoolean") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AChar") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Char") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AInt") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ALong") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AShort") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Short") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AByte") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AFloat") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Float") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ADouble") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ABoolean") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Boolean") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AChar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'c'") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Char") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + CharacterLiteral("'c'") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Int") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ALong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Long") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AShort") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Short") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AByte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Byte") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("AFloat") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("4.2f") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Float") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("4.2f") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ADouble") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("4.2") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Double") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("4.2") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/notNullTypeParameter/supplier.KotlinMain.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/notNullTypeParameter/supplier.KotlinMain.antlrtree.txt new file mode 100644 index 000000000..982850733 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/notNullTypeParameter/supplier.KotlinMain.antlrtree.txt @@ -0,0 +1,294 @@ +File: supplier.KotlinMain.kt - ebb2d08986a8757ee32097031636a59f + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("compute") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("apply") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("compute") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("apply") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("consume") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.Foo.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.Foo.antlrtree.txt new file mode 100644 index 000000000..669d49b98 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.Foo.antlrtree.txt @@ -0,0 +1,167 @@ +File: interdependentTypeParametersFromKotlin.reversed.Foo.kt - dfa18fa657348c70d7ac8f9d0b69fede + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("P1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P2") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P3") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P4") + RANGLE(">") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("P2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P1") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P3") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P4") + RANGLE(">") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("P3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P1") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P2") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P4") + RANGLE(">") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("P4") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P1") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P2") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("P3") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.main.antlrtree.txt new file mode 100644 index 000000000..a0020bebd --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/interdependentTypeParametersFromKotlin.reversed.main.antlrtree.txt @@ -0,0 +1,59 @@ +File: interdependentTypeParametersFromKotlin.reversed.main.kt - 4305738fdea1283f7e2b950486559fbd + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Boo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("test1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/lostRawTypeAfterElvis.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/lostRawTypeAfterElvis.main.antlrtree.txt new file mode 100644 index 000000000..f9a4fecda --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/lostRawTypeAfterElvis.main.antlrtree.txt @@ -0,0 +1,168 @@ +File: lostRawTypeAfterElvis.main.kt - 4a2a77d74dd5820913a57a2f934e2aa6 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("Generic") + DOT(".") + simpleIdentifier + Identifier("ML") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ML") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("generic2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("create") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/noTypeArgumentsForRawScopedMembers.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/noTypeArgumentsForRawScopedMembers.main.antlrtree.txt new file mode 100644 index 000000000..ce24f69e1 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/noTypeArgumentsForRawScopedMembers.main.antlrtree.txt @@ -0,0 +1,252 @@ +File: noTypeArgumentsForRawScopedMembers.main.kt - 102d443450f0eb6de1be39c7ee7fe65c + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("Generic") + DOT(".") + simpleIdentifier + Identifier("ML") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ML") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("generic1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("create") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("generic2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("create") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.main.antlrtree.txt new file mode 100644 index 000000000..4562dd30d --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.main.antlrtree.txt @@ -0,0 +1,185 @@ +File: nonProjectedInnerErasure.main.kt - 64a02a518e01e8e6dc0ccf8ea5fe3bc4 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CidrBuildTarget") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("BC") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CidrRunConfiguration") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("BC") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("TARGET") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CidrBuildTarget") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BC") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("applyEditorTo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CidrRunConfiguration") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CidrBuildTarget") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("applyEditorTo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("CustomGdbServerRunConfiguration") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.reversed.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.reversed.main.antlrtree.txt new file mode 100644 index 000000000..e385158dd --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/nonProjectedInnerErasure.reversed.main.antlrtree.txt @@ -0,0 +1,185 @@ +File: nonProjectedInnerErasure.reversed.main.kt - 64a02a518e01e8e6dc0ccf8ea5fe3bc4 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CidrBuildTarget") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("BC") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("CidrRunConfiguration") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("BC") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("TARGET") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CidrBuildTarget") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("BC") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("applyEditorTo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CidrRunConfiguration") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CidrBuildTarget") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("applyEditorTo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("CustomGdbServerRunConfiguration") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/nonRawArraysInRawType.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/nonRawArraysInRawType.main.antlrtree.txt new file mode 100644 index 000000000..66b5a9972 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/nonRawArraysInRawType.main.antlrtree.txt @@ -0,0 +1,205 @@ +File: nonRawArraysInRawType.main.kt - 3ada2f16fc1f5a2e60af9a71fd29bf68 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("generic") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("create") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("x") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("x") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeSyntheticExtensions.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeSyntheticExtensions.main.antlrtree.txt new file mode 100644 index 000000000..da7b168a9 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeSyntheticExtensions.main.antlrtree.txt @@ -0,0 +1,298 @@ +File: rawTypeSyntheticExtensions.main.kt - f0dc9b6d38974ba7faa36f06c21b31a6 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("generic") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("create") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("generic") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("child") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("children") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/smartCastToClassWithRawSupertype.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/smartCastToClassWithRawSupertype.main.antlrtree.txt new file mode 100644 index 000000000..229a56f36 --- /dev/null +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/smartCastToClassWithRawSupertype.main.antlrtree.txt @@ -0,0 +1,251 @@ +File: smartCastToClassWithRawSupertype.main.kt - d863175804a4bc0bb62511da6ef64a13 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NonGenericClassWithRawSuperType") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("GenericClass") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getUserData") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("k") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("NonGenericClassWithRawSuperType") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getUserData") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("k") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/prefixIncReturnType.antlrtree.txt b/grammar/testData/diagnostics/prefixIncReturnType.antlrtree.txt new file mode 100644 index 000000000..f2f3d871d --- /dev/null +++ b/grammar/testData/diagnostics/prefixIncReturnType.antlrtree.txt @@ -0,0 +1,207 @@ +File: prefixIncReturnType.kt - 3e2877cae1418df9523186db2e7d7cf0 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("inc") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ST") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ST") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ST") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("I") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("topLevel") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("I") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ST") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + INCR("++") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("topLevel") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/prefixIncSmartCast.antlrtree.txt b/grammar/testData/diagnostics/prefixIncSmartCast.antlrtree.txt new file mode 100644 index 000000000..503001611 --- /dev/null +++ b/grammar/testData/diagnostics/prefixIncSmartCast.antlrtree.txt @@ -0,0 +1,214 @@ +File: prefixIncSmartCast.kt - cb86a455a204ecf4e7cef9e3a05003e8 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("inc") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ST") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ST") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ST") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("I") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("local") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("I") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ST") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + INCR("++") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("local") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ST") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("local") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/properties/constAnnotationCycle.antlrtree.txt b/grammar/testData/diagnostics/properties/constAnnotationCycle.antlrtree.txt new file mode 100644 index 000000000..cac0a974b --- /dev/null +++ b/grammar/testData/diagnostics/properties/constAnnotationCycle.antlrtree.txt @@ -0,0 +1,99 @@ +File: constAnnotationCycle.kt - 2530492f67136a43db60fabd5f1b8225 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Anno") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Anno") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("constant") + RPAREN(")") + NL("\n") + modifier + propertyModifier + CONST("const") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("constant") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + EOF("") diff --git a/grammar/testData/diagnostics/properties/inferPropertyTypeFromGetter.antlrtree.txt b/grammar/testData/diagnostics/properties/inferPropertyTypeFromGetter.antlrtree.txt new file mode 100644 index 000000000..82cfd70f7 --- /dev/null +++ b/grammar/testData/diagnostics/properties/inferPropertyTypeFromGetter.antlrtree.txt @@ -0,0 +1,263 @@ +File: inferPropertyTypeFromGetter.kt - 75b2a0e36a21db41d147792af11e4107 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo0") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("child") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("allChildren") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("child") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("allChildren") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("child") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("allChildren") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("child") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo0") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("allChildren") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("allChildren") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/properties/kt56707.antlrtree.txt b/grammar/testData/diagnostics/properties/kt56707.antlrtree.txt new file mode 100644 index 000000000..54229e5b6 --- /dev/null +++ b/grammar/testData/diagnostics/properties/kt56707.antlrtree.txt @@ -0,0 +1,242 @@ +File: kt56707.kt - 11c476091ac5e04340b31addd69c880a + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("children") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mutableSetOf") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("allChildren") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Set") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + RANGLE(">") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("children") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("children") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("flatMap") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("allChildren") + RCURL("}") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toSet") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("use") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("allChildren") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/properties/localPropertyExtensions.antlrtree.txt b/grammar/testData/diagnostics/properties/localPropertyExtensions.antlrtree.txt new file mode 100644 index 000000000..bb08a06a6 --- /dev/null +++ b/grammar/testData/diagnostics/properties/localPropertyExtensions.antlrtree.txt @@ -0,0 +1,57 @@ +File: localPropertyExtensions.kt - 23cd7c48806c471e2e669407a9605b5f + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("count") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/rawCastToStarProjection_Fail.antlrtree.txt b/grammar/testData/diagnostics/rawCastToStarProjection_Fail.antlrtree.txt new file mode 100644 index 000000000..36cd398b7 --- /dev/null +++ b/grammar/testData/diagnostics/rawCastToStarProjection_Fail.antlrtree.txt @@ -0,0 +1,139 @@ +File: rawCastToStarProjection_Fail.kt - 19e6087c098e1d8504d8078f77d997f0 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("ValueType") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Optional") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ValueType") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("checkType") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("type") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ValueType") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("type") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ValueType") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Optional") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/rawCastToStarProjection_Ok.antlrtree.txt b/grammar/testData/diagnostics/rawCastToStarProjection_Ok.antlrtree.txt new file mode 100644 index 000000000..d6b327896 --- /dev/null +++ b/grammar/testData/diagnostics/rawCastToStarProjection_Ok.antlrtree.txt @@ -0,0 +1,152 @@ +File: rawCastToStarProjection_Ok.kt - 762ee05969d6dd0dc34cb4fb80aff656 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("ValueType") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Optional") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("ValueType") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("checkType") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("type") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ValueType") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("type") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ValueType") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Optional") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/rawTypes/kt57620.ProjectMain.antlrtree.txt b/grammar/testData/diagnostics/rawTypes/kt57620.ProjectMain.antlrtree.txt new file mode 100644 index 000000000..ac38e7358 --- /dev/null +++ b/grammar/testData/diagnostics/rawTypes/kt57620.ProjectMain.antlrtree.txt @@ -0,0 +1,237 @@ +File: kt57620.ProjectMain.kt - c8709210b4e6807eda0f409967ea82c6 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("getRunCommandLine") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("configuration") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("PythonRunConfiguration") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("envs") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Map") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkSubtype") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Map") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("configuration") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fetchEnvs") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("checkSubtype") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Map") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("configuration") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fetchEnvs") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/receiverResolutionInDelegatedConstructor.antlrtree.txt b/grammar/testData/diagnostics/receiverResolutionInDelegatedConstructor.antlrtree.txt new file mode 100644 index 000000000..b478c90b8 --- /dev/null +++ b/grammar/testData/diagnostics/receiverResolutionInDelegatedConstructor.antlrtree.txt @@ -0,0 +1,558 @@ +File: receiverResolutionInDelegatedConstructor.kt - 596fe9ddd99138b0a4531938d9e2ed1b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("p") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Vase") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("p") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Vase") + DOT(".") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + DOT(".") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("BaseLambda") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("lambda") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + DOT(".") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + DOT(".") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + RPAREN(")") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f1.antlrtree.txt b/grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f1.antlrtree.txt new file mode 100644 index 000000000..afc00d38e --- /dev/null +++ b/grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f1.antlrtree.txt @@ -0,0 +1,28 @@ +File: ClassRedeclarationInDifferentFiles.ll.f1.kt - 9e8dbd6616847d237d0a82f21b4dbfa7 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("F1") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f2.antlrtree.txt b/grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f2.antlrtree.txt new file mode 100644 index 000000000..acd24a594 --- /dev/null +++ b/grammar/testData/diagnostics/redeclarations/ClassRedeclarationInDifferentFiles.ll.f2.antlrtree.txt @@ -0,0 +1,25 @@ +File: ClassRedeclarationInDifferentFiles.ll.f2.kt - 1d92901da04b3ba521c900a6a50b48f5 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("F2") + EOF("") diff --git a/grammar/testData/diagnostics/redeclarations/RedeclaredValsAndVars.antlrtree.txt b/grammar/testData/diagnostics/redeclarations/RedeclaredValsAndVars.antlrtree.txt new file mode 100644 index 000000000..2dfbe79eb --- /dev/null +++ b/grammar/testData/diagnostics/redeclarations/RedeclaredValsAndVars.antlrtree.txt @@ -0,0 +1,557 @@ +File: RedeclaredValsAndVars.kt - 32bfad54084ef211be40d97cc79440e3 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("component1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("component2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testRedeclaration") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("`_`") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("`_`") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + postfixUnarySuffix + callSuffix + annotatedLambda + NL("\n") + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("11") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testNoRedeclaration") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("list") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("el") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("list") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("el") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("z") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("z") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + NL("\n") + RCURL("}") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + multiVariableDeclaration + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("`_`") + COMMA(",") + variableDeclaration + simpleIdentifier + Identifier("_") + RPAREN(")") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/referenceToParameterizedFun.antlrtree.txt b/grammar/testData/diagnostics/referenceToParameterizedFun.antlrtree.txt new file mode 100644 index 000000000..96e8fa42a --- /dev/null +++ b/grammar/testData/diagnostics/referenceToParameterizedFun.antlrtree.txt @@ -0,0 +1,138 @@ +File: referenceToParameterizedFun.kt - 7a5fba023b36af30417efd630acc6c18 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("consume") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("consume") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.main.antlrtree.txt b/grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.main.antlrtree.txt new file mode 100644 index 000000000..771164486 --- /dev/null +++ b/grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.main.antlrtree.txt @@ -0,0 +1,81 @@ +File: resolutionToTypealiasInsteadOfProperty.main.kt - f1f11bb05d8eaee1b698edfc80a75a31 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("pkg") + DOT(".") + simpleIdentifier + Identifier("ItemKey") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ItemKey") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ItemKey") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.pkg.antlrtree.txt b/grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.pkg.antlrtree.txt new file mode 100644 index 000000000..14f0fa1fe --- /dev/null +++ b/grammar/testData/diagnostics/resolutionToTypealiasInsteadOfProperty.pkg.antlrtree.txt @@ -0,0 +1,35 @@ +File: resolutionToTypealiasInsteadOfProperty.pkg.kt - ec0f57d1c178ded535d462eca4b385da + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("pkg") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Klass") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ItemKey") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Klass") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/companionPropertyAndTypeParameter.antlrtree.txt b/grammar/testData/diagnostics/resolve/companionPropertyAndTypeParameter.antlrtree.txt new file mode 100644 index 000000000..d0ea48b8b --- /dev/null +++ b/grammar/testData/diagnostics/resolve/companionPropertyAndTypeParameter.antlrtree.txt @@ -0,0 +1,838 @@ +File: companionPropertyAndTypeParameter.kt - 4455939f241e44915aea581f9f4128bc + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("any") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("42L") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C1") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("test") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("12") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C2") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("test") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("12") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C3") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("test") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C4") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("test") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("some") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/errorPriority.test.antlrtree.txt b/grammar/testData/diagnostics/resolve/errorPriority.test.antlrtree.txt new file mode 100644 index 000000000..bbab13a4c --- /dev/null +++ b/grammar/testData/diagnostics/resolve/errorPriority.test.antlrtree.txt @@ -0,0 +1,165 @@ +File: errorPriority.test.kt - e84089f881d6addc0ebef3b64eeef30d + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("myJClass") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyJClass") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myJClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("meth") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("myJClass") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyJClass2") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myJClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("meth") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/avoidTypeCheckerRecursion.main.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/avoidTypeCheckerRecursion.main.antlrtree.txt new file mode 100644 index 000000000..deb2f71b4 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/avoidTypeCheckerRecursion.main.antlrtree.txt @@ -0,0 +1,260 @@ +File: avoidTypeCheckerRecursion.main.kt - 7cbce43e660c153ab2605b3b6c172dda + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("KotlinIndex") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("JavaIndex") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("indexer") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("MyKotlinIndex") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("KotlinIndex") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("INDEXER") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("indexer") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getIndexer") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("INDEXER") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyKotlinIndex") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getIndexer") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/closeInvokesFarVariable.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/closeInvokesFarVariable.antlrtree.txt new file mode 100644 index 000000000..55da23e41 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/closeInvokesFarVariable.antlrtree.txt @@ -0,0 +1,276 @@ +File: closeInvokesFarVariable.kt - 5b687b447063e3446b23c61ba2b73e52 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Any") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("barbaz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeInt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/closerVariableMatterMore.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/closerVariableMatterMore.antlrtree.txt new file mode 100644 index 000000000..636832437 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/closerVariableMatterMore.antlrtree.txt @@ -0,0 +1,297 @@ +File: closerVariableMatterMore.kt - a35b8e7272479a55dcdffd91a5e7be8d + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeDouble") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("bar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + semis + NL("\n") + statement + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("res") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeDouble") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("res") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/completePropertyBeforeInvoke.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/completePropertyBeforeInvoke.antlrtree.txt new file mode 100644 index 000000000..d48b6dcb8 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/completePropertyBeforeInvoke.antlrtree.txt @@ -0,0 +1,377 @@ +File: completePropertyBeforeInvoke.kt - 8b9c016cf6f10a8d6d5e5390777f1b09 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("XTrackableLoading") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Property") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("LoadingValue") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + RANGLE(">") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("liveLoaded") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("LoadingValue") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Property") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("AsyncModule") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AsyncModule") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("R") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("handler") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("R") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("XTrackableLoading") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("fooBar") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Property") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("LoadingValue") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("AsyncModule") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("fooBar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("liveLoaded") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/implicitAndInvokeExtensionPriority.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/implicitAndInvokeExtensionPriority.antlrtree.txt new file mode 100644 index 000000000..30960b310 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/implicitAndInvokeExtensionPriority.antlrtree.txt @@ -0,0 +1,288 @@ +File: implicitAndInvokeExtensionPriority.kt - 0e21f115f147cb6e5f60e49266087083 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + semis + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("2") + QUOTE_CLOSE(""") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeInt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/implicitPropertyType.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/implicitPropertyType.antlrtree.txt new file mode 100644 index 000000000..9ff517c47 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/implicitPropertyType.antlrtree.txt @@ -0,0 +1,176 @@ +File: implicitPropertyType.kt - cd0c1767276edee2b1b10ab79a9c0e90 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("baz") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem.antlrtree.txt new file mode 100644 index 000000000..c922ddd8e --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem.antlrtree.txt @@ -0,0 +1,324 @@ +File: invokeCommonSystem.kt - 1d5601ae8e1e5f5a4f9270b008039f20 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Box") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Res") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Res") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem2.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem2.antlrtree.txt new file mode 100644 index 000000000..e466f26ed --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/invokeCommonSystem2.antlrtree.txt @@ -0,0 +1,483 @@ +File: invokeCommonSystem2.kt - 83287d5e5e4299214024b88579dd613f + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Box") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Res") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Res") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("X") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Res") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("X") + RANGLE(">") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/kt51793.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/kt51793.antlrtree.txt new file mode 100644 index 000000000..9d410d83e --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/kt51793.antlrtree.txt @@ -0,0 +1,209 @@ +File: kt51793.kt - f92535c7a25fb60c4fe06423c935f261 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Key") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Builder") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Builder") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Builder") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + DOT(".") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("k") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/kt51793Complex.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/kt51793Complex.antlrtree.txt new file mode 100644 index 000000000..e2e8fcb27 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/invoke/kt51793Complex.antlrtree.txt @@ -0,0 +1,566 @@ +File: kt51793Complex.kt - 1e3a62cbe31f7678a63aab9ed90c3642 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Key1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Key2") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key2") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key1") + DOT(".") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A1") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key1") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Key1") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A2") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Key2") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Key2") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("with1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A1") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A1") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("with2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A2") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A2") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with1") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("with2") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("k") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/overloadConflicts/filteringOutOverrides.antlrtree.txt b/grammar/testData/diagnostics/resolve/overloadConflicts/filteringOutOverrides.antlrtree.txt new file mode 100644 index 000000000..6204ae81c --- /dev/null +++ b/grammar/testData/diagnostics/resolve/overloadConflicts/filteringOutOverrides.antlrtree.txt @@ -0,0 +1,728 @@ +File: filteringOutOverrides.kt - 8c7f825563467f99fbe2adae0bc3a5a9 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MyGenericInterface") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("update") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("SubGenericInterface") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("MyGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("update") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("SubInterfaceInt") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("SubGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("update") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("update") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SubGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("update") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyGenericInterface") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Number") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SubInterfaceInt") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("update") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("expectInt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("w") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/overloadConflicts/kt55722.antlrtree.txt b/grammar/testData/diagnostics/resolve/overloadConflicts/kt55722.antlrtree.txt new file mode 100644 index 000000000..5e700df2d --- /dev/null +++ b/grammar/testData/diagnostics/resolve/overloadConflicts/kt55722.antlrtree.txt @@ -0,0 +1,279 @@ +File: kt55722.kt - fae13d649d3301a8ae8dc4c3e196cdf3 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/overloadConflicts/kt55722Initial.antlrtree.txt b/grammar/testData/diagnostics/resolve/overloadConflicts/kt55722Initial.antlrtree.txt new file mode 100644 index 000000000..c7744199a --- /dev/null +++ b/grammar/testData/diagnostics/resolve/overloadConflicts/kt55722Initial.antlrtree.txt @@ -0,0 +1,226 @@ +File: kt55722Initial.kt - 382d65de4d52e5f704da56690c316370 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("MyConsumer") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("consume") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyConsumer") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("consume") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/resolve/priority/extensionVsMember.antlrtree.txt b/grammar/testData/diagnostics/resolve/priority/extensionVsMember.antlrtree.txt new file mode 100644 index 000000000..7f1b58e15 --- /dev/null +++ b/grammar/testData/diagnostics/resolve/priority/extensionVsMember.antlrtree.txt @@ -0,0 +1,212 @@ +File: extensionVsMember.kt - ddd0d1ac70f60a565091a5489a189e42 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Some") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("child") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Some") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Some") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("foo") + getter + GET("get") + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("child") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("foo") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RPAREN(")") + comparisonOperator + RANGLE(">") + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/safeCalls/safeCallOnFlexibleTypeAlias.main.antlrtree.txt b/grammar/testData/diagnostics/safeCalls/safeCallOnFlexibleTypeAlias.main.antlrtree.txt new file mode 100644 index 000000000..38c684b73 --- /dev/null +++ b/grammar/testData/diagnostics/safeCalls/safeCallOnFlexibleTypeAlias.main.antlrtree.txt @@ -0,0 +1,166 @@ +File: safeCallOnFlexibleTypeAlias.main.kt - c52754f24b2264b2bdd9e3e90318a5ca + packageHeader + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("JsExpressionResult") + ASSIGNMENT("=") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("countElementsByXpathAsync") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("promise") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyPromise") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JsExpressionResult") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JsExpressionResult") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("promise") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("then") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/samConversions/samConversionWithCondition.antlrtree.txt b/grammar/testData/diagnostics/samConversions/samConversionWithCondition.antlrtree.txt new file mode 100644 index 000000000..acb2c3a74 --- /dev/null +++ b/grammar/testData/diagnostics/samConversions/samConversionWithCondition.antlrtree.txt @@ -0,0 +1,1394 @@ +File: samConversionWithCondition.kt - 37d6ac02869f9459f99f4f7dd51729f8 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("flag") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("num") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("num") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("dec") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("num") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("num") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("dec") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("num") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("num") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("dec") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Exception") + RPAREN(")") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("num") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("num") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("dec") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + excl + EXCL_NO_WS("!") + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("tick") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("tick") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("tick") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("tick") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Exception") + RPAREN(")") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Throwable") + RPAREN(")") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("tick") + RCURL("}") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + elvis + QUEST_NO_WS("?") + COLON(":") + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("tick") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("tick") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("num") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("consumeTicker") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("ticker") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Ticker") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("Ticker") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("tick") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("num") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/samConversions/samConversionWithConditionJava.main.antlrtree.txt b/grammar/testData/diagnostics/samConversions/samConversionWithConditionJava.main.antlrtree.txt new file mode 100644 index 000000000..06ee0a7c2 --- /dev/null +++ b/grammar/testData/diagnostics/samConversions/samConversionWithConditionJava.main.antlrtree.txt @@ -0,0 +1,320 @@ +File: samConversionWithConditionJava.main.kt - b4bba176aac2a0e670d8244985aab942 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("flag") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Tickers") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("flag") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("s") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RCURL("}") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Tickers") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("consumeTicker") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Selectors") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("s") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/samConversions/samConversionWithSafeCallAndInference.antlrtree.txt b/grammar/testData/diagnostics/samConversions/samConversionWithSafeCallAndInference.antlrtree.txt new file mode 100644 index 000000000..4ef96149a --- /dev/null +++ b/grammar/testData/diagnostics/samConversions/samConversionWithSafeCallAndInference.antlrtree.txt @@ -0,0 +1,194 @@ +File: samConversionWithSafeCallAndInference.kt - 58987b8dfd2944b966b3d37824a0d02e + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("java") + DOT(".") + simpleIdentifier + Identifier("util") + DOT(".") + simpleIdentifier + Identifier("function") + DOT(".") + simpleIdentifier + Identifier("Supplier") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Panel") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("supplier") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Supplier") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Panel") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + RCURL("}") + RCURL("}") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.base.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.base.antlrtree.txt new file mode 100644 index 000000000..8089b366f --- /dev/null +++ b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.base.antlrtree.txt @@ -0,0 +1,67 @@ +File: invisibleInternalSetterAccessFromDeriviedClass.base.kt - eb300ae9f65adac7665ad511c330e5b3 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + setter + modifiers + modifier + visibilityModifier + INTERNAL("internal") + SET("set") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived1.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived1.antlrtree.txt new file mode 100644 index 000000000..0107f0c07 --- /dev/null +++ b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived1.antlrtree.txt @@ -0,0 +1,362 @@ +File: invisibleInternalSetterAccessFromDeriviedClass.derived1.kt - 9fdd5763e98e4e9f16b4abb6a71b3de1 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testBase") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Derived1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PARAM("param") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Derived2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Derived1") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testFunction") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived1") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived2.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived2.antlrtree.txt new file mode 100644 index 000000000..5fdda32bb --- /dev/null +++ b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClass.derived2.antlrtree.txt @@ -0,0 +1,308 @@ +File: invisibleInternalSetterAccessFromDeriviedClass.derived2.kt - 4adc2e7a794580d34290185666e2a9dd + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testDerivied1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived1") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testDerivied2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived2") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derivied3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Derived2") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PARAM("param") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.base.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.base.antlrtree.txt new file mode 100644 index 000000000..c23425784 --- /dev/null +++ b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.base.antlrtree.txt @@ -0,0 +1,67 @@ +File: invisibleInternalSetterAccessFromDeriviedClassOn.base.kt - eb300ae9f65adac7665ad511c330e5b3 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + NL("\n") + setter + modifiers + modifier + visibilityModifier + INTERNAL("internal") + SET("set") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived1.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived1.antlrtree.txt new file mode 100644 index 000000000..b8b2f679d --- /dev/null +++ b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived1.antlrtree.txt @@ -0,0 +1,362 @@ +File: invisibleInternalSetterAccessFromDeriviedClassOn.derived1.kt - 9fdd5763e98e4e9f16b4abb6a71b3de1 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testBase") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Derived1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PARAM("param") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Derived2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Derived1") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testFunction") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived1") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived2.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived2.antlrtree.txt new file mode 100644 index 000000000..4e6c0ecaa --- /dev/null +++ b/grammar/testData/diagnostics/scopes/invisibleInternalSetterAccessFromDeriviedClassOn.derived2.antlrtree.txt @@ -0,0 +1,310 @@ +File: invisibleInternalSetterAccessFromDeriviedClassOn.derived2.kt - acd65cae513cbeb89f75d53bca887aad + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testDerivied1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived1") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testDerivied2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived2") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("other") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derivied3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Derived2") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + PARAM("param") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + PARAM("param") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/variantProjections/dataClassCopy.antlrtree.txt b/grammar/testData/diagnostics/scopes/variantProjections/dataClassCopy.antlrtree.txt new file mode 100644 index 000000000..717b232ae --- /dev/null +++ b/grammar/testData/diagnostics/scopes/variantProjections/dataClassCopy.antlrtree.txt @@ -0,0 +1,272 @@ +File: dataClassCopy.kt - adcfc4b0e71f98853ec8f17442431e4b + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Out") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("prop") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/variantProjections/interdependentStarProjections.antlrtree.txt b/grammar/testData/diagnostics/scopes/variantProjections/interdependentStarProjections.antlrtree.txt new file mode 100644 index 000000000..388511361 --- /dev/null +++ b/grammar/testData/diagnostics/scopes/variantProjections/interdependentStarProjections.antlrtree.txt @@ -0,0 +1,647 @@ +File: interdependentStarProjections.kt - 7cb20c5eee66980bf4b41a2dde6c78c9 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("F") + COMMA(",") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("E") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("copy") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("B") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("X") + COMMA(",") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("Y") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b2") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b1") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b1") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b3") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/scopes/variantProjections/unsafeVarianceAndCovariantProjection.antlrtree.txt b/grammar/testData/diagnostics/scopes/variantProjections/unsafeVarianceAndCovariantProjection.antlrtree.txt new file mode 100644 index 000000000..8df764f24 --- /dev/null +++ b/grammar/testData/diagnostics/scopes/variantProjections/unsafeVarianceAndCovariantProjection.antlrtree.txt @@ -0,0 +1,982 @@ +File: unsafeVarianceAndCovariantProjection.kt - f847335e7c6dd3504908b61410070565 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Out1") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("copy") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("o1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out1") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out1") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out1") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o3") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Out2") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("copy") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out2") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("o1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out2") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out2") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out2") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o3") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Out3") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + OUT("out") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("copy") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeModifiers + typeModifier + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("UnsafeVariance") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("o1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("o3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Out3") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o1") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o1") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o2") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o1") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o3") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("copy") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o1") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/senselessComparison/complexExpression.antlrtree.txt b/grammar/testData/diagnostics/senselessComparison/complexExpression.antlrtree.txt new file mode 100644 index 000000000..559db9b96 --- /dev/null +++ b/grammar/testData/diagnostics/senselessComparison/complexExpression.antlrtree.txt @@ -0,0 +1,148 @@ +File: complexExpression.kt - 01f9be453c32bc473f345d44c407b4c2 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("repro") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + semis + NL("\n") + RCURL("}") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/implicitThisOrLocalVar.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/implicitThisOrLocalVar.antlrtree.txt new file mode 100644 index 000000000..44cbda7de --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/implicitThisOrLocalVar.antlrtree.txt @@ -0,0 +1,678 @@ +File: implicitThisOrLocalVar.kt - 43b25ad1171808e7c948e37ab1cb2ce6 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Box") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAR("var") + simpleIdentifier + Identifier("item") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("expectString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("it") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + DOT(".") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("other") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Box") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("item") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("item") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("item") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("item") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("item") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("item") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("item") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("myRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("item") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS("this") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("item") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("expectString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("item") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("myRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/intersectionScope/capturedSpecificity.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/intersectionScope/capturedSpecificity.antlrtree.txt new file mode 100644 index 000000000..f6e6d5035 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/intersectionScope/capturedSpecificity.antlrtree.txt @@ -0,0 +1,418 @@ +File: capturedSpecificity.kt - 62d98a81e6fae3f6d37a5174c93c058e + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("assignable") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + quest + QUEST_NO_WS("?") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/intersectionScope/intersectReturnType.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/intersectionScope/intersectReturnType.antlrtree.txt new file mode 100644 index 000000000..cdc36230a --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/intersectionScope/intersectReturnType.antlrtree.txt @@ -0,0 +1,602 @@ +File: intersectReturnType.kt - 0baab920c3ec874dca95bf78efb5708d + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("assignable") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("assignable") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + VALUE("value") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/kt45814.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/kt45814.antlrtree.txt new file mode 100644 index 000000000..153b986df --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/kt45814.antlrtree.txt @@ -0,0 +1,498 @@ +File: kt45814.kt - 65b39ba6b4a648df75307f5ae3748731 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("bar") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/publicVals/accessThrowOtherModule.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/publicVals/accessThrowOtherModule.antlrtree.txt new file mode 100644 index 000000000..03fa6ddd9 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/publicVals/accessThrowOtherModule.antlrtree.txt @@ -0,0 +1,309 @@ +File: accessThrowOtherModule.kt - 1691ff9deb6322c77c1cdd7ffe33c59a + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("Data") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("pair") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Pair") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Data") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pair") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("second") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pair") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("second") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("inc") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pair") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("pair") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("first") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.A.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.A.antlrtree.txt new file mode 100644 index 000000000..939fc8397 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.A.antlrtree.txt @@ -0,0 +1,33 @@ +File: smartCastOnAlienPropertyFromInvisibleClass.A.kt - 25371e68b181462fb436e5ca12b57e32 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.B.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.B.antlrtree.txt new file mode 100644 index 000000000..c3dd21308 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.B.antlrtree.txt @@ -0,0 +1,330 @@ +File: smartCastOnAlienPropertyFromInvisibleClass.B.kt - d66e31fe372013edcad6d194326000ab + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("Internal") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("456") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Internal") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.A.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.A.antlrtree.txt new file mode 100644 index 000000000..7b4367772 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.A.antlrtree.txt @@ -0,0 +1,33 @@ +File: smartCastOnAlienPropertyFromInvisibleClassForbidden.A.kt - 25371e68b181462fb436e5ca12b57e32 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.B.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.B.antlrtree.txt new file mode 100644 index 000000000..29857e1ea --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/smartCastOnAlienPropertyFromInvisibleClassForbidden.B.antlrtree.txt @@ -0,0 +1,330 @@ +File: smartCastOnAlienPropertyFromInvisibleClassForbidden.B.kt - d66e31fe372013edcad6d194326000ab + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("Internal") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("456") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Internal") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/smartcastInFriendModule.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/smartcastInFriendModule.antlrtree.txt new file mode 100644 index 000000000..f9b1467cd --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/smartcastInFriendModule.antlrtree.txt @@ -0,0 +1,530 @@ +File: smartcastInFriendModule.kt - ccc96904c0840dba9f03e794833a317e + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/smartcastToStarProjection.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/smartcastToStarProjection.antlrtree.txt new file mode 100644 index 000000000..eb29dd4f3 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/smartcastToStarProjection.antlrtree.txt @@ -0,0 +1,444 @@ +File: smartcastToStarProjection.kt - 5749b46984a3f4f63e46b051e5483f8b + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Inv") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + GET("get") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + simpleIdentifier + Identifier("produce") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("producer") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("O") + RANGLE(">") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("O") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("UNCHECKED_CAST") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("id") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + GET("get") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("produce") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + GET("get") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("t") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/capturedLoopVariable.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/capturedLoopVariable.antlrtree.txt new file mode 100644 index 000000000..2a968ddbe --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/capturedLoopVariable.antlrtree.txt @@ -0,0 +1,2249 @@ +File: capturedLoopVariable.kt - c6f75a75528e35025c7e0a0d79937eac + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("world") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_4_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("getString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("getNullableString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_4_2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + NL("\n") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("getString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("getString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("noInlineRun") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("getNullableString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("getString") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("noInlineRun") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/capturedWithControlJumps.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/capturedWithControlJumps.antlrtree.txt new file mode 100644 index 000000000..aaca56301 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/capturedWithControlJumps.antlrtree.txt @@ -0,0 +1,2309 @@ +File: capturedWithControlJumps.kt - c6e6fbd9f45ec959a8e0fb113f161be2 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lambda") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + ARROW("->") + controlStructureBody + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("asd") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lambda") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + tryExpression + TRY("try") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + THROW("throw") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("RuntimeException") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + RCURL("}") + catchBlock + CATCH("catch") + LPAREN("(") + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Exception") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + finallyBlock + FINALLY("finally") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lambda") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + BREAK("break") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lambda") + COLON(":") + type + nullableType + parenthesizedType + LPAREN("(") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test6") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("lambda") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("x") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("s") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("y") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("10") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lambda") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("s") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("lambda") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/localDelegatedProperty.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/localDelegatedProperty.antlrtree.txt new file mode 100644 index 000000000..9f997a893 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/localDelegatedProperty.antlrtree.txt @@ -0,0 +1,238 @@ +File: localDelegatedProperty.kt - 980a3bdce416159e3e42a0037862a268 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("properties") + DOT(".") + simpleIdentifier + Identifier("Delegates") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("test") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegates") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("observable") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + PROPERTY("property") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("oldValue") + COMMA(",") + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("newValue") + ARROW("->") + statements + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("test") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/objectMembers.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/objectMembers.antlrtree.txt new file mode 100644 index 000000000..3bc769704 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/objectMembers.antlrtree.txt @@ -0,0 +1,2829 @@ +File: objectMembers.kt - 609e890385655155b9f741c586f0abb5 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("objectInit") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("o") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("objectMethod") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("o") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("o") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("classInit") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ctor") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("C") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ctor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("classMethod") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("ctor") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("C") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ctor") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("runInInverseOrder") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("objectInParallelLambda") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("runInInverseOrder") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + RCURL("}") + RCURL("}") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + COMMA(",") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/reassignedDependency.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/reassignedDependency.antlrtree.txt new file mode 100644 index 000000000..3a2a3e8d9 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/reassignedDependency.antlrtree.txt @@ -0,0 +1,2326 @@ +File: reassignedDependency.kt - f4a94bee06cf23f764af5239a84cf7cd + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("q") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("q") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("q") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("...") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/reassignedDependency_unstable.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/reassignedDependency_unstable.antlrtree.txt new file mode 100644 index 000000000..43b9e8665 --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/reassignedDependency_unstable.antlrtree.txt @@ -0,0 +1,2090 @@ +File: reassignedDependency_unstable.kt - 726090d42f8082abc8806c4efd337022 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + NL("\n") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("q") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("q") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("q") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + ELSE("else") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/variables/reassignedInRhs.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/reassignedInRhs.antlrtree.txt new file mode 100644 index 000000000..85ef362ab --- /dev/null +++ b/grammar/testData/diagnostics/smartCasts/variables/reassignedInRhs.antlrtree.txt @@ -0,0 +1,1416 @@ +File: reassignedInRhs.kt - bea9ce9016cb191992cb174bf43aeba3 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("contracts") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("OptIn") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ExperimentalContracts") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RPAREN(")") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("isNotNullAlsoCall") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("contract") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("returns") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + RPAREN(")") + simpleIdentifier + Identifier("implies") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("callsInPlace") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("InvocationKind") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("EXACTLY_ONCE") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("binaryBooleanExpression") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DISJ("||") + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + parenthesizedExpression + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("also") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unoverriddenEquals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("also") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + RCURL("}") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("safeCall") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + SEMICOLON(";") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("contractFunction") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("isNotNullAlsoCall") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/subtyping/delegatedConstructor.bar.antlrtree.txt b/grammar/testData/diagnostics/subtyping/delegatedConstructor.bar.antlrtree.txt new file mode 100644 index 000000000..3e01330d4 --- /dev/null +++ b/grammar/testData/diagnostics/subtyping/delegatedConstructor.bar.antlrtree.txt @@ -0,0 +1,73 @@ +File: delegatedConstructor.bar.kt - eafc8a56797f017657b809f9db8fc4d5 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("lib") + DOT(".") + simpleIdentifier + Identifier("Base") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Bar") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("BarImpl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/subtyping/delegatedConstructor.foo.antlrtree.txt b/grammar/testData/diagnostics/subtyping/delegatedConstructor.foo.antlrtree.txt new file mode 100644 index 000000000..67613e7c5 --- /dev/null +++ b/grammar/testData/diagnostics/subtyping/delegatedConstructor.foo.antlrtree.txt @@ -0,0 +1,76 @@ +File: delegatedConstructor.foo.kt - 95b09f3ea6ae1c42fddd10149d12a39d + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("lib") + DOT(".") + simpleIdentifier + Identifier("Base") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("FooImpl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + typeArguments + LANGLE("<") + typeProjection + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/subtyping/delegatedConstructor.lib.antlrtree.txt b/grammar/testData/diagnostics/subtyping/delegatedConstructor.lib.antlrtree.txt new file mode 100644 index 000000000..0f8140e49 --- /dev/null +++ b/grammar/testData/diagnostics/subtyping/delegatedConstructor.lib.antlrtree.txt @@ -0,0 +1,37 @@ +File: delegatedConstructor.lib.kt - ff441299864966b96bd85cda7b08531f + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("lib") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Base") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + varianceModifier + IN("in") + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/subtyping/kFunctionalCST.antlrtree.txt b/grammar/testData/diagnostics/subtyping/kFunctionalCST.antlrtree.txt new file mode 100644 index 000000000..af0d82524 --- /dev/null +++ b/grammar/testData/diagnostics/subtyping/kFunctionalCST.antlrtree.txt @@ -0,0 +1,865 @@ +File: kFunctionalCST.kt - ead3877e17fb10c78b6586b50d6d330b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Base") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + primaryConstructor + classParameters + LPAREN("(") + classParameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("A") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("B") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("cond") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("cond") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("A") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("B") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("cond") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("cond") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("A") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("B") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("it") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperType.antlrtree.txt b/grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperType.antlrtree.txt new file mode 100644 index 000000000..2e1c0ee19 --- /dev/null +++ b/grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperType.antlrtree.txt @@ -0,0 +1,662 @@ +File: suspendExtFunctionTypeAsSuperType.kt - a06b538113292086796157aed40994d7 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A0") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("D") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B0") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B1") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B2") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("E") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C0") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C1") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("E") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperTypeRestrictionLifted.antlrtree.txt b/grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperTypeRestrictionLifted.antlrtree.txt new file mode 100644 index 000000000..cffa67cf5 --- /dev/null +++ b/grammar/testData/diagnostics/subtyping/suspendExtFunctionTypeAsSuperTypeRestrictionLifted.antlrtree.txt @@ -0,0 +1,664 @@ +File: suspendExtFunctionTypeAsSuperTypeRestrictionLifted.kt - 7a988f2de78545032cf9fbdbde385cd9 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("invoke") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("p2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A0") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("A2") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("D") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B0") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B1") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B2") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("D") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("E") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C0") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("C1") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("E") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + annotatedDelegationSpecifier + delegationSpecifier + functionType + receiverType + typeModifiers + typeModifier + SUSPEND("suspend") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + DOT(".") + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/suppressExposedPropertyTypeInConstructor.antlrtree.txt b/grammar/testData/diagnostics/suppressExposedPropertyTypeInConstructor.antlrtree.txt new file mode 100644 index 000000000..f738bec4a --- /dev/null +++ b/grammar/testData/diagnostics/suppressExposedPropertyTypeInConstructor.antlrtree.txt @@ -0,0 +1,224 @@ +File: suppressExposedPropertyTypeInConstructor.kt - ffe633a40980659841515dc072df4057 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Foo") + enumClassBody + LCURL("{") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("B") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Bar") + primaryConstructor + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Var") + primaryConstructor + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Zar") + primaryConstructor + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + COMMA(",") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/suppressExposedPropertyTypeInPrivateConstructor.antlrtree.txt b/grammar/testData/diagnostics/suppressExposedPropertyTypeInPrivateConstructor.antlrtree.txt new file mode 100644 index 000000000..dafe363fe --- /dev/null +++ b/grammar/testData/diagnostics/suppressExposedPropertyTypeInPrivateConstructor.antlrtree.txt @@ -0,0 +1,236 @@ +File: suppressExposedPropertyTypeInPrivateConstructor.kt - 828780f34341152ddc7713b6c6c7e705 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("Foo") + enumClassBody + LCURL("{") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("B") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Bar") + primaryConstructor + modifiers + modifier + visibilityModifier + PRIVATE("private") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Var") + primaryConstructor + modifiers + modifier + visibilityModifier + PRIVATE("private") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Zar") + primaryConstructor + modifiers + modifier + visibilityModifier + PRIVATE("private") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + QUOTE_CLOSE(""") + RPAREN(")") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + COMMA(",") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt b/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt new file mode 100644 index 000000000..b3f14c72e --- /dev/null +++ b/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt @@ -0,0 +1,105 @@ +File: suspendAnonymousAsNonSuspend.kt - e178c9ebb4f76c98a97c17a3997f69b2 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("produce") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + Identifier("produce") + LCURL("{") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + receiverType + LPAREN("(") + RPAREN(")") + LCURL("{") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt b/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt new file mode 100644 index 000000000..f95b234bb --- /dev/null +++ b/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt @@ -0,0 +1,61 @@ +File: suspendCallFromAnonymousSuspend.kt - d7a03c31795075a8132f7c54b289e493 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + receiverType + LPAREN("(") + RPAREN(")") + LCURL("{") + NL("\n") + Identifier("bar") + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + NL("\n") + NL("\n") + DOT("") + simpleIdentifier + SUSPEND("suspend") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/suspendConversion/suspendFunctionExpectedTypeAndWhen.antlrtree.txt b/grammar/testData/diagnostics/suspendConversion/suspendFunctionExpectedTypeAndWhen.antlrtree.txt new file mode 100644 index 000000000..f2a86aafb --- /dev/null +++ b/grammar/testData/diagnostics/suspendConversion/suspendFunctionExpectedTypeAndWhen.antlrtree.txt @@ -0,0 +1,410 @@ +File: suspendFunctionExpectedTypeAndWhen.kt - e77dfca215ca087c3187086cb63fed42 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeModifiers + typeModifier + SUSPEND("suspend") + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("_") + ARROW("->") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeModifiers + typeModifier + SUSPEND("suspend") + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("x") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + lambdaParameters + lambdaParameter + variableDeclaration + simpleIdentifier + Identifier("y") + ARROW("->") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("y") + RPAREN(")") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + SUSPEND("suspend") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/syntheticExtensions/javaProperties/FullySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt b/grammar/testData/diagnostics/syntheticExtensions/javaProperties/FullySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt new file mode 100644 index 000000000..925534e32 --- /dev/null +++ b/grammar/testData/diagnostics/syntheticExtensions/javaProperties/FullySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt @@ -0,0 +1,128 @@ +File: FullySupportedSyntheticJavaPropertyReference.KotlinFile.kt - bff0bfaa4a674ba084ac176132490a8c + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("call") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("call") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("JavaClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/syntheticExtensions/javaProperties/OverrideOnlyGetterFromGenericJavaClass.main.antlrtree.txt b/grammar/testData/diagnostics/syntheticExtensions/javaProperties/OverrideOnlyGetterFromGenericJavaClass.main.antlrtree.txt new file mode 100644 index 000000000..239903e88 --- /dev/null +++ b/grammar/testData/diagnostics/syntheticExtensions/javaProperties/OverrideOnlyGetterFromGenericJavaClass.main.antlrtree.txt @@ -0,0 +1,273 @@ +File: OverrideOnlyGetterFromGenericJavaClass.main.kt - 9a93e995e2b0bd1bb9cad83c2599cddf + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("KotlinTableView") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("Item") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("TableView") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Item") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("getSelection") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Item") + RANGLE(">") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("javaTable") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaTableView") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("kotlinTable") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KotlinTableView") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("selection") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ArrayList") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("javaTable") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("selection") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("selection") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("kotlinTable") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("selection") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("selection") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/syntheticSet.test.antlrtree.txt b/grammar/testData/diagnostics/syntheticSet.test.antlrtree.txt new file mode 100644 index 000000000..615d8ae98 --- /dev/null +++ b/grammar/testData/diagnostics/syntheticSet.test.antlrtree.txt @@ -0,0 +1,2949 @@ +File: syntheticSet.test.kt - 8f2cb19b317187afcf587f56c467db9d + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("w") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setWrapper") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setWrapper") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("123") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("gau") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("dif") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("O") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + OUT("out") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setWrapper") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("inn") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setWrapper") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("generic") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("container") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Container") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("wrapper") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Wrapper") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("arg") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("wrapper") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setWrapper") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("wrapper") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("O") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("456") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("simple") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("container") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setSimple") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("arg") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/syntheticSetFalsePositive.main.antlrtree.txt b/grammar/testData/diagnostics/syntheticSetFalsePositive.main.antlrtree.txt new file mode 100644 index 000000000..af48b928f --- /dev/null +++ b/grammar/testData/diagnostics/syntheticSetFalsePositive.main.antlrtree.txt @@ -0,0 +1,157 @@ +File: syntheticSetFalsePositive.main.kt - 63f942dc60dc0adb3e47e540e323cf13 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaClass") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("l") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableList") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("l") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("l") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithExplicitApi/kt56505.antlrtree.txt b/grammar/testData/diagnostics/testsWithExplicitApi/kt56505.antlrtree.txt new file mode 100644 index 000000000..2553d15e2 --- /dev/null +++ b/grammar/testData/diagnostics/testsWithExplicitApi/kt56505.antlrtree.txt @@ -0,0 +1,231 @@ +File: kt56505.kt - c207f339ff5c031f81f35e1f176f2483 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("LocalClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("LocalClass") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("J1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("buf") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + getter + modifiers + modifier + visibilityModifier + PRIVATE("private") + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + NL("\n") + setter + modifiers + modifier + visibilityModifier + PROTECTED("protected") + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + VALUE("value") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/explicitSuperConstructorCall.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/explicitSuperConstructorCall.antlrtree.txt new file mode 100644 index 000000000..2de1070a3 --- /dev/null +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/explicitSuperConstructorCall.antlrtree.txt @@ -0,0 +1,396 @@ +File: explicitSuperConstructorCall.kt - 3a3b668e84b2bf83debb70e73957b48e + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmRecord") + NL("\n") + modifier + classModifier + DATA("data") + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Byte") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + constructorDelegationCall + SUPER("super") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("unresolved") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + RPAREN(")") + NL("\n") + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("unresolved") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithExplicitComponent.main.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithExplicitComponent.main.antlrtree.txt new file mode 100644 index 000000000..aed7b9e7e --- /dev/null +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithExplicitComponent.main.antlrtree.txt @@ -0,0 +1,167 @@ +File: javaRecordWithExplicitComponent.main.kt - a0e919f7de26b02f38e0680b14660177 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("mr") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyRecord") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithGeneric.main.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithGeneric.main.antlrtree.txt new file mode 100644 index 000000000..20c826efe --- /dev/null +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/javaRecordWithGeneric.main.antlrtree.txt @@ -0,0 +1,518 @@ +File: javaRecordWithGeneric.main.kt - d7a7c7a1e5c744eb843dd4bc6e7d8c21 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeInt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeString") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeAny") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("mr") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyRecord") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("mr") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyRecord") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("mr") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyRecord") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeAny") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeAny") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsDefaultConstructor.main.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsDefaultConstructor.main.antlrtree.txt new file mode 100644 index 000000000..d89d4c0d0 --- /dev/null +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsDefaultConstructor.main.antlrtree.txt @@ -0,0 +1,94 @@ +File: simpleRecordsDefaultConstructor.main.kt - 1c37ab063341e1af113325ab2d8ba640 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyRecord") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyRecord") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsWithSecondaryConstructor.main.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsWithSecondaryConstructor.main.antlrtree.txt new file mode 100644 index 000000000..afa9213f9 --- /dev/null +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecordsWithSecondaryConstructor.main.antlrtree.txt @@ -0,0 +1,166 @@ +File: simpleRecordsWithSecondaryConstructor.main.kt - f227ade8458a6b92550e0380dc9b82f5 + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("mr") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MyRecord") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyRecord") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("MyRecord") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("4L") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/sealedClasses/flexibleSealedInSubject.main.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/sealedClasses/flexibleSealedInSubject.main.antlrtree.txt new file mode 100644 index 000000000..1521b2004 --- /dev/null +++ b/grammar/testData/diagnostics/testsWithJava17/sealedClasses/flexibleSealedInSubject.main.antlrtree.txt @@ -0,0 +1,766 @@ +File: flexibleSealedInSubject.main.kt - b045fb8840c12a40457b211112ad451a + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_0") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("base") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("base") + RPAREN(")") + LCURL("{") + NL("\n") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("base") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("base") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("base") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Base") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Base") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Base") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Base") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/thisAndSuper/considerAnonymousObjectsForSuperclassNotAccessibleFromInterface.antlrtree.txt b/grammar/testData/diagnostics/thisAndSuper/considerAnonymousObjectsForSuperclassNotAccessibleFromInterface.antlrtree.txt new file mode 100644 index 000000000..96b54a13d --- /dev/null +++ b/grammar/testData/diagnostics/thisAndSuper/considerAnonymousObjectsForSuperclassNotAccessibleFromInterface.antlrtree.txt @@ -0,0 +1,164 @@ +File: considerAnonymousObjectsForSuperclassNotAccessibleFromInterface.kt - 6635d7d45dd8df28d3f264ac5d768926 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("KotlinBaseClass") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("kotlinFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("sealedInterface") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("someFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("KotlinBaseClass") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("kotlinFun") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + superExpression + SUPER("super") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("kotlinFun") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + EOF("") diff --git a/grammar/testData/diagnostics/typeParameters/inProjectedDnnParameter.test.antlrtree.txt b/grammar/testData/diagnostics/typeParameters/inProjectedDnnParameter.test.antlrtree.txt new file mode 100644 index 000000000..2b987c987 --- /dev/null +++ b/grammar/testData/diagnostics/typeParameters/inProjectedDnnParameter.test.antlrtree.txt @@ -0,0 +1,485 @@ +File: inProjectedDnnParameter.test.kt - c7ed5a6a36660a55c953baa5d7360d17 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("KotlinAction") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("execute") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + definitelyNonNullableType + userType + simpleUserType + simpleIdentifier + Identifier("T") + AMP("&") + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("checkJavaIn") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("action") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaAction") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("action") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("execute") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("element") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("checkKotlinIn") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("action") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KotlinAction") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("action") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("execute") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("element") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("checkJavaInv") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("action") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaAction") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("action") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("execute") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("element") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("checkKotlinInv") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("element") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("action") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KotlinAction") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("action") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("execute") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("element") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typeParameters/kt46186.reversed.antlrtree.txt b/grammar/testData/diagnostics/typeParameters/kt46186.reversed.antlrtree.txt new file mode 100644 index 000000000..c25411113 --- /dev/null +++ b/grammar/testData/diagnostics/typeParameters/kt46186.reversed.antlrtree.txt @@ -0,0 +1,2631 @@ +File: kt46186.reversed.kt - a0888289b6c096dd3c5d44f87c6e70ae + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("View1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("View2") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("View3") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("View4") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("View5") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + RANGLE(">") + simpleIdentifier + Identifier("findViewById1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + RANGLE(">") + simpleIdentifier + Identifier("findViewById3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + RANGLE(">") + simpleIdentifier + Identifier("findViewById5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById5") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + RANGLE(">") + simpleIdentifier + Identifier("findViewById6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById6") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + RANGLE(">") + simpleIdentifier + Identifier("findViewById7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById7") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + RANGLE(">") + simpleIdentifier + Identifier("findViewById8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById8") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById9") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById10") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById11") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Obj") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById5") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById6") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById7") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById8") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById9") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById10") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById11") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typeParameters/kt46186withEmptyIntersections.antlrtree.txt b/grammar/testData/diagnostics/typeParameters/kt46186withEmptyIntersections.antlrtree.txt new file mode 100644 index 000000000..53e8faa49 --- /dev/null +++ b/grammar/testData/diagnostics/typeParameters/kt46186withEmptyIntersections.antlrtree.txt @@ -0,0 +1,2633 @@ +File: kt46186withEmptyIntersections.kt - 1474f540c77e73acbff85031716249f9 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("View1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("View2") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("View3") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("View4") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("View5") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + RANGLE(">") + simpleIdentifier + Identifier("findViewById1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + RANGLE(">") + simpleIdentifier + Identifier("findViewById3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + RANGLE(">") + simpleIdentifier + Identifier("findViewById5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById5") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + RANGLE(">") + simpleIdentifier + Identifier("findViewById6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById6") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + RANGLE(">") + simpleIdentifier + Identifier("findViewById7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById7") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + RANGLE(">") + simpleIdentifier + Identifier("findViewById8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById8") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById9") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById10") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById11") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Obj") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test1") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test5") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById5") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test6") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById6") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test7") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById7") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + RANGLE(">") + simpleIdentifier + Identifier("findViewById8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test8") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById8") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test9") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById9") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("findViewById10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View3") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test10") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById10") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View2") + RANGLE(">") + simpleIdentifier + Identifier("findViewById11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test11") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("View4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("findViewById11") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + typeConstraints + WHERE("where") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + typeConstraint + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typeParameters/typeParameterChainInReceiver.antlrtree.txt b/grammar/testData/diagnostics/typeParameters/typeParameterChainInReceiver.antlrtree.txt new file mode 100644 index 000000000..eff17c5ab --- /dev/null +++ b/grammar/testData/diagnostics/typeParameters/typeParameterChainInReceiver.antlrtree.txt @@ -0,0 +1,60 @@ +File: typeParameterChainInReceiver.kt - e37d9eb3040972e9f5a099104da5cd17 + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("X") + DOT(".") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typeParameters/typeParameterChainInReturnType.antlrtree.txt b/grammar/testData/diagnostics/typeParameters/typeParameterChainInReturnType.antlrtree.txt new file mode 100644 index 000000000..0668aa178 --- /dev/null +++ b/grammar/testData/diagnostics/typeParameters/typeParameterChainInReturnType.antlrtree.txt @@ -0,0 +1,58 @@ +File: typeParameterChainInReturnType.kt - 1d3f4e19b9c222784d835e9a6521a7bc + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("X") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.1.antlrtree.txt b/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.1.antlrtree.txt new file mode 100644 index 000000000..8894c1751 --- /dev/null +++ b/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.1.antlrtree.txt @@ -0,0 +1,57 @@ +File: importFromTypeAliasObject.reversed.1.kt - 28f17f4ed0f3dd2be1432e70f77040c0 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("bar") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("HostAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Host") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("Host") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.2.antlrtree.txt b/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.2.antlrtree.txt new file mode 100644 index 000000000..5f0761c86 --- /dev/null +++ b/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.reversed.2.antlrtree.txt @@ -0,0 +1,61 @@ +File: importFromTypeAliasObject.reversed.2.kt - 285b1af75b2f8f6ae2b458cd06c2f5fc + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("bar") + DOT(".") + simpleIdentifier + Identifier("HostAlias") + DOT(".") + simpleIdentifier + Identifier("foo") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.foo.antlrtree.txt b/grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.foo.antlrtree.txt new file mode 100644 index 000000000..d66bd183e --- /dev/null +++ b/grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.foo.antlrtree.txt @@ -0,0 +1,38 @@ +File: importMemberFromJavaViaAlias.reversed.foo.kt - 727234cd91769eab2add9e5de91974f6 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("kot") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("JavaAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("test") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("jv") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("JavaSample") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.test.antlrtree.txt b/grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.test.antlrtree.txt new file mode 100644 index 000000000..06a684b0b --- /dev/null +++ b/grammar/testData/diagnostics/typealias/importMemberFromJavaViaAlias.reversed.test.antlrtree.txt @@ -0,0 +1,100 @@ +File: importMemberFromJavaViaAlias.reversed.test.kt - f9bdef15d086b1f0cc238f5dc21bbbbf + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("kot") + DOT(".") + simpleIdentifier + Identifier("JavaAlias") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("kot") + DOT(".") + simpleIdentifier + Identifier("JavaAlias") + DOT(".") + simpleIdentifier + Identifier("member") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("sample") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaSample") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("alias") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JavaAlias") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("member") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/kt57065.antlrtree.txt b/grammar/testData/diagnostics/typealias/kt57065.antlrtree.txt new file mode 100644 index 000000000..30ca4092e --- /dev/null +++ b/grammar/testData/diagnostics/typealias/kt57065.antlrtree.txt @@ -0,0 +1,133 @@ +File: kt57065.kt - 6cc75dd0a29b91771495aff876841602 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("GlobalUndoLogRef") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("GlobalUndoLogRef") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("p") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Long") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("GlobalUndoLogRef") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("p") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("GlobalUndoLogRef") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("42") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/privateInFile.ll.file1.antlrtree.txt b/grammar/testData/diagnostics/typealias/privateInFile.ll.file1.antlrtree.txt new file mode 100644 index 000000000..f4f75de35 --- /dev/null +++ b/grammar/testData/diagnostics/typealias/privateInFile.ll.file1.antlrtree.txt @@ -0,0 +1,209 @@ +File: privateInFile.ll.file1.kt - a6e804d6ff8405d7ff1f09952587528b + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("C") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + PRIVATE("private") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TA") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test1co") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Companion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("TA") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TA") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test2co") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TA") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/privateInFile.ll.file2.antlrtree.txt b/grammar/testData/diagnostics/typealias/privateInFile.ll.file2.antlrtree.txt new file mode 100644 index 000000000..eac38c7d3 --- /dev/null +++ b/grammar/testData/diagnostics/typealias/privateInFile.ll.file2.antlrtree.txt @@ -0,0 +1,196 @@ +File: privateInFile.ll.file2.kt - 272e67e681a25991175ac3dc08c7b116 + packageHeader + importList + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test1co") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("Companion") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("C") + NL("\n") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("TA") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TA") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test2co") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TA") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + CLASS("class") + simpleIdentifier + Identifier("C") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + visibilityModifier + PRIVATE("private") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TA") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.bar.antlrtree.txt b/grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.bar.antlrtree.txt new file mode 100644 index 000000000..8c739c247 --- /dev/null +++ b/grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.bar.antlrtree.txt @@ -0,0 +1,117 @@ +File: starImportOnTypeAlias.reversed.bar.kt - 8a964f54de19e2d1c86b82fd0bcec13f + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("ClassAlias") + DOT(".") + MULT("*") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("ObjectAlias") + DOT(".") + MULT("*") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("EnumAlias") + DOT(".") + MULT("*") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("test") + DOT(".") + simpleIdentifier + Identifier("EnumAlias") + semi + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Entry") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumAlias") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("Entry") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.foo.antlrtree.txt b/grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.foo.antlrtree.txt new file mode 100644 index 000000000..80c2e6905 --- /dev/null +++ b/grammar/testData/diagnostics/typealias/starImportOnTypeAlias.reversed.foo.antlrtree.txt @@ -0,0 +1,99 @@ +File: starImportOnTypeAlias.reversed.foo.kt - f6760592c0fb697bf44732477c073e40 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("test") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ClassAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ClassSample") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("ObjectAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ObjectSample") + semis + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("EnumAlias") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("EnumSample") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("ClassSample") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("ObjectSample") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumSample") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("Entry") + SEMICOLON(";") + NL("\n") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/unexpectedSafeCall.antlrtree.txt b/grammar/testData/diagnostics/unexpectedSafeCall.antlrtree.txt new file mode 100644 index 000000000..adddc6dee --- /dev/null +++ b/grammar/testData/diagnostics/unexpectedSafeCall.antlrtree.txt @@ -0,0 +1,108 @@ +File: unexpectedSafeCall.kt - dc67e3a56599e4cfa535277386227c2e + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("run") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + RCURL("}") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + safeNav + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("let") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.annotation.antlrtree.txt b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.annotation.antlrtree.txt new file mode 100644 index 000000000..a27d10b90 --- /dev/null +++ b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.annotation.antlrtree.txt @@ -0,0 +1,27 @@ +File: implicitIntegerCoercionNamedArg.annotation.kt - 05c3599c6eee61462d43ea0bbb69b7be + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + INTERNAL("internal") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.test.antlrtree.txt b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.test.antlrtree.txt new file mode 100644 index 000000000..8fcd108ad --- /dev/null +++ b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.test.antlrtree.txt @@ -0,0 +1,228 @@ +File: implicitIntegerCoercionNamedArg.test.kt - 0028676948fc6d8a4a1dcd485e1ae568 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + INTERNAL("internal") + DOT(".") + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("UInt") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("main") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("println") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("println") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.annotation.antlrtree.txt b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.annotation.antlrtree.txt new file mode 100644 index 000000000..6b67bd7b9 --- /dev/null +++ b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.annotation.antlrtree.txt @@ -0,0 +1,27 @@ +File: implicitIntegerCoercionOverloading.annotation.kt - 05c3599c6eee61462d43ea0bbb69b7be + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + INTERNAL("internal") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.test.antlrtree.txt b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.test.antlrtree.txt new file mode 100644 index 000000000..f97a5df2c --- /dev/null +++ b/grammar/testData/diagnostics/unsignedTypes/conversions/implicitIntegerCoercionOverloading.test.antlrtree.txt @@ -0,0 +1,634 @@ +File: implicitIntegerCoercionOverloading.test.kt - 7dce06481d9f7f2b88febcb4dc19c268 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + INTERNAL("internal") + DOT(".") + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("UInt") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ULong") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testLong") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + singleAnnotation + AT_NO_WS("@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ImplicitIntegerCoercion") + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ULong") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + RPAREN(")") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toUInt") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Fail: test(5)") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("test") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("5L") + RPAREN(")") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("5L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toULong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Fail: test(5L)") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("testLong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + RPAREN(")") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("5L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toULong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Fail: test(5L)") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("testLong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("5L") + RPAREN(")") + equalityOperator + EXCL_EQ("!=") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + LongLiteral("5L") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toULong") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("Fail: test(5L)") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("OK") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/unusedVariableOnRegularDelegatedProperty.antlrtree.txt b/grammar/testData/diagnostics/unusedVariableOnRegularDelegatedProperty.antlrtree.txt new file mode 100644 index 000000000..33fecb7b6 --- /dev/null +++ b/grammar/testData/diagnostics/unusedVariableOnRegularDelegatedProperty.antlrtree.txt @@ -0,0 +1,355 @@ +File: unusedVariableOnRegularDelegatedProperty.kt - 853f254a968121de9e13bd657c3f9ec5 + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Example") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("valProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("varProp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("valVariable") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("varVariable") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Delegate") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Delegate") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("delegation") + QUOTE_CLOSE(""") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("setValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/annotations.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/annotations.antlrtree.txt new file mode 100644 index 000000000..56e274466 --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/annotations.antlrtree.txt @@ -0,0 +1,3031 @@ +File: annotations.kt - a51374c7339ac19bd50809d3e36a2cf6 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KProperty") + semi + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Repeatable") + NL("\n") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Ann") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + FIELD("field") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + FIELD("field") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("getValue") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("thisRef") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + PROPERTY("property") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KProperty") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("B") + primaryConstructor + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + FIELD("field") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + classParameter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + FIELD("field") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + quest + QUEST_NO_WS("?") + COMMA(",") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("JvmName") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("otherName") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + CLASS("class") + simpleIdentifier + Identifier("C") + primaryConstructor + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + CONSTRUCTOR("constructor") + classParameters + LPAREN("(") + classParameter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + FIELD("field") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + SET("set") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + SETPARAM("setparam") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + VAR("var") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + classParameter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PARAM("param") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + FIELD("field") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + SET("set") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + SETPARAM("setparam") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + VAR("var") + simpleIdentifier + Identifier("y") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + quest + QUEST_NO_WS("?") + COMMA(",") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + DELEGATE("delegate") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("z") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("200") + RPAREN(")") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + DELEGATE("delegate") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("100") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + unaryPrefix + prefixUnaryOperator + SUB("-") + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("200") + RPAREN(")") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + DELEGATE("delegate") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + PROPERTY("property") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("d") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + COLONCOLON("::") + simpleIdentifier + Identifier("z") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS(" @") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmField") + NL("\n") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + FUN("fun") + receiverType + typeModifiers + typeModifier + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + RECEIVER("receiver") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("t") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + multiAnnotation + AT_NO_WS("@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + functionValueParameter + parameterModifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + functionValueParameter + parameterModifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + statement + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + FUN("fun") + receiverType + typeModifiers + typeModifier + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + RECEIVER("receiver") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + simpleIdentifier + Identifier("t") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + annotation + multiAnnotation + AT_NO_WS("@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + functionValueParameter + parameterModifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + functionValueParameter + parameterModifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("4") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + VAR("var") + receiverType + typeModifiers + typeModifier + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + RECEIVER("receiver") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("t") + NL("\n") + getter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + setter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterModifiers + annotation + multiAnnotation + AT_NO_WS("@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameterWithOptionalType + simpleIdentifier + Identifier("_") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + modifiers + annotation + multiAnnotation + AT_PRE_WS("\n@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + VAR("var") + receiverType + typeModifiers + typeModifier + annotation + multiAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + RECEIVER("receiver") + COLON(":") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + DOT(".") + variableDeclaration + simpleIdentifier + Identifier("t") + NL("\n") + getter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + NL("\n") + setter + modifiers + annotation + multiAnnotation + AT_PRE_WS(" @") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + NL("\n") + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterModifiers + annotation + multiAnnotation + AT_NO_WS("@") + LSQUARE("[") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + RSQUARE("]") + parameterWithOptionalType + simpleIdentifier + Identifier("_") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/defaultParameters.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/defaultParameters.antlrtree.txt new file mode 100644 index 000000000..0b8024fbb --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/defaultParameters.antlrtree.txt @@ -0,0 +1,192 @@ +File: defaultParameters.kt - 3f92e0bf6b09f5b42b1aae5de4417dc2 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("DPoint") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Double") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Double") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("NaN") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("otherDPoint") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("DPoint") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("DPoint") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("1.0") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + RealLiteral("2.0") + RPAREN(")") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/inefficientEqualsOverridingInMfvc.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/inefficientEqualsOverridingInMfvc.antlrtree.txt new file mode 100644 index 000000000..76c03d2e8 --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/inefficientEqualsOverridingInMfvc.antlrtree.txt @@ -0,0 +1,527 @@ +File: inefficientEqualsOverridingInMfvc.kt - e6416e9a3e4c1a1f76df646110896456 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + isOperator + NOT_IS("!is ") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC1") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("false") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC3") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/inlineKeywordForMfvc.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/inlineKeywordForMfvc.antlrtree.txt new file mode 100644 index 000000000..d3c8c6b85 --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/inlineKeywordForMfvc.antlrtree.txt @@ -0,0 +1,478 @@ +File: inlineKeywordForMfvc.kt - acce5c457c73f4602046bea42cdda593 + NL("\n") + NL("\n") + NL("\n") + fileAnnotation + AT_PRE_WS("\n@") + FILE("file") + COLON(":") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INLINE_CLASS_DEPRECATED") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("A1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("A2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("A3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("A4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("B1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("B2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("B3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("B4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("C1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B2") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("C2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B2") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + functionModifier + INLINE("inline") + CLASS("class") + simpleIdentifier + Identifier("C3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B2") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("C4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B2") + RPAREN(")") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideMfvc.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideMfvc.antlrtree.txt new file mode 100644 index 000000000..1a13b7fc1 --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideMfvc.antlrtree.txt @@ -0,0 +1,2603 @@ +File: reservedMembersAndConstructsInsideMfvc.kt - f9f08a13f087d89123d85dd69472cfbc + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("jvm") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("JvmInline") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("my") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("WithBox") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("WithBox") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC5") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("something") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC6") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("my") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("unbox") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC4") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("WithBox") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("box") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC5") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + secondaryConstructor + CONSTRUCTOR("constructor") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + COLON(":") + constructorDelegationCall + THIS("this") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("toString") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("6") + QUOTE_CLOSE(""") + RPAREN(")") + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("something") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC6") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC6") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC7") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC7") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC8") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC8") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC9") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC9") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/typedEqualsOperatorModifierInMfvc.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/typedEqualsOperatorModifierInMfvc.antlrtree.txt new file mode 100644 index 000000000..f8cc1df6f --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/typedEqualsOperatorModifierInMfvc.antlrtree.txt @@ -0,0 +1,326 @@ +File: typedEqualsOperatorModifierInMfvc.kt - 06b805d8c7080403de09ebdf652c9e68 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC1") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC1") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("hashCode") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("MFVC2") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC1") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MFVC2") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassWithGenericUnderlyingTypeNoFeature.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassWithGenericUnderlyingTypeNoFeature.antlrtree.txt new file mode 100644 index 000000000..0357f3833 --- /dev/null +++ b/grammar/testData/diagnostics/valueClasses/valueClassWithGenericUnderlyingTypeNoFeature.antlrtree.txt @@ -0,0 +1,231 @@ +File: valueClassWithGenericUnderlyingTypeNoFeature.kt - c04e7603d35764bb1445cf3e1801d5e7 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("jvm") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("JvmInline") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("Foo") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("FooNullable") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_NO_WS("?") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("FooGenericArray") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("FooGenericArray2") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/javaInterfaceFieldDirectAccess.Child.antlrtree.txt b/grammar/testData/diagnostics/visibility/javaInterfaceFieldDirectAccess.Child.antlrtree.txt new file mode 100644 index 000000000..20bef33ce --- /dev/null +++ b/grammar/testData/diagnostics/visibility/javaInterfaceFieldDirectAccess.Child.antlrtree.txt @@ -0,0 +1,99 @@ +File: javaInterfaceFieldDirectAccess.Child.kt - 0c62dbbbbde96ff42c7148976f76b082 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("javapackage") + DOT(".") + simpleIdentifier + Identifier("PublicParentInterface") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("PublicParentInterface") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("publicStaticField") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/kt56283.antlrtree.txt b/grammar/testData/diagnostics/visibility/kt56283.antlrtree.txt new file mode 100644 index 000000000..f2cda26f0 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/kt56283.antlrtree.txt @@ -0,0 +1,454 @@ +File: kt56283.kt - 1c422f67187527fa1a1cc24161b72c70 + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Base") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("other") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + primaryConstructor + classParameters + LPAREN("(") + classParameter + modifiers + modifier + memberModifier + OVERRIDE("override") + VAL("val") + simpleIdentifier + Identifier("foo") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Derived") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/moreSpecificProtected.antlrtree.txt b/grammar/testData/diagnostics/visibility/moreSpecificProtected.antlrtree.txt new file mode 100644 index 000000000..ec5cd2517 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/moreSpecificProtected.antlrtree.txt @@ -0,0 +1,3036 @@ +File: moreSpecificProtected.kt - ca1e37ac43ac838ff10dd8cdf00a8061 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Base") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M1") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M2") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M2Sub") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("M2") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M3") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M3Sub") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("M3") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M4") + semis + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M5") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M5Sub") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("M5") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M5SubSub") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("M5Sub") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M6") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M2") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M3") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M4") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M5") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fromB") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Any") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M2Sub") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M5Sub") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M1") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M3") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M2Sub") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M4") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M5Sub") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M6") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + ARROW("->") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fromC") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M2Sub") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M6") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fromB") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M3") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M5Sub") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + ARROW("->") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("fromC") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M2Sub") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M3") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M6") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + simpleIdentifier + Identifier("checkType") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + lambdaLiteral + LCURL("{") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("_") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M5Sub") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RCURL("}") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("B") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("fromC") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Any") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M3Sub") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M5SubSub") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M6") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/moreSpecificProtectedSimple.antlrtree.txt b/grammar/testData/diagnostics/visibility/moreSpecificProtectedSimple.antlrtree.txt new file mode 100644 index 000000000..be88a2f62 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/moreSpecificProtectedSimple.antlrtree.txt @@ -0,0 +1,1010 @@ +File: moreSpecificProtectedSimple.kt - 54384e3d636311dcada515e715f821a5 + NL("\n") + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Base") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Derived") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Base") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M1") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("success") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("M1Sub") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("M1") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + modifier + visibilityModifier + PROTECTED("protected") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("success") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("success") + semis + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("success") + semis + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("d") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("success") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M1Sub") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("M1") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PUBLIC("public") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Base") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/notOverridingInternal.Base.antlrtree.txt b/grammar/testData/diagnostics/visibility/notOverridingInternal.Base.antlrtree.txt new file mode 100644 index 000000000..d35ceacb8 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/notOverridingInternal.Base.antlrtree.txt @@ -0,0 +1,87 @@ +File: notOverridingInternal.Base.kt - 3aaf95a2432cfaa19d444424b3809e1f + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("base") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("Base") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("internalFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + FUN("fun") + simpleIdentifier + Identifier("internalFoo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/notOverridingInternal.Impl.antlrtree.txt b/grammar/testData/diagnostics/visibility/notOverridingInternal.Impl.antlrtree.txt new file mode 100644 index 000000000..61915bdec --- /dev/null +++ b/grammar/testData/diagnostics/visibility/notOverridingInternal.Impl.antlrtree.txt @@ -0,0 +1,153 @@ +File: notOverridingInternal.Impl.kt - f2129be2e9c6c5fb1c721a1a1acc47ed + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("impl") + semi + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("base") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Impl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("internalFoo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Impl") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Impl") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("internalFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/notOverridingPackagePrivate.Impl.antlrtree.txt b/grammar/testData/diagnostics/visibility/notOverridingPackagePrivate.Impl.antlrtree.txt new file mode 100644 index 000000000..e55b3fb20 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/notOverridingPackagePrivate.Impl.antlrtree.txt @@ -0,0 +1,153 @@ +File: notOverridingPackagePrivate.Impl.kt - 03a24d332a41bb4326b84c8fb1b59c73 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("impl") + semi + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("base") + DOT(".") + MULT("*") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Impl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Base") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("packagePrivateFoo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Impl") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Impl") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("packagePrivateFoo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStatic.main.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStatic.main.antlrtree.txt new file mode 100644 index 000000000..a04496c72 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStatic.main.antlrtree.txt @@ -0,0 +1,167 @@ +File: packagePrivateStatic.main.kt - c6b3e98b27e284e6041697546c81ce6a + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("bar") + semi + NL("\n") + NL("\n") + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("Derived") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Impl") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Derived") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Derived") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStatic.withImport.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStatic.withImport.antlrtree.txt new file mode 100644 index 000000000..e1d2e5b0d --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStatic.withImport.antlrtree.txt @@ -0,0 +1,61 @@ +File: packagePrivateStatic.withImport.kt - a183f50ced3e1fa3019e17f0d8e26537 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("foo") + DOT(".") + simpleIdentifier + Identifier("Derived") + DOT(".") + simpleIdentifier + Identifier("baz") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.Child.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.Child.antlrtree.txt new file mode 100644 index 000000000..8e5c204b1 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.Child.antlrtree.txt @@ -0,0 +1,162 @@ +File: packagePrivateStaticInterfaceFieldViaKotlinClass.Child.kt - a4e4fb33015d6b3dabe5068a1b5a3c20 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("javapackage") + DOT(".") + simpleIdentifier + Identifier("PublicParentClass") + semi + NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("javapackage") + DOT(".") + simpleIdentifier + Identifier("KotlinParentClass") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("PublicParentClass") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("publicStaticField") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("y") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PublicParentClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("publicStaticField") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("z") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("KotlinParentClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("publicStaticField") + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.javapackage_KotlinParentClass.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.javapackage_KotlinParentClass.antlrtree.txt new file mode 100644 index 000000000..ba20aa95d --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceFieldViaKotlinClass.javapackage_KotlinParentClass.antlrtree.txt @@ -0,0 +1,28 @@ +File: packagePrivateStaticInterfaceFieldViaKotlinClass.javapackage_KotlinParentClass.kt - 273c3f98c28db2015aa09b9782dfa8d5 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("javapackage") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("KotlinParentClass") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("PackagePrivateGrandparentInterface") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceMethod.Child.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceMethod.Child.antlrtree.txt new file mode 100644 index 000000000..5ba34a1a1 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStaticInterfaceMethod.Child.antlrtree.txt @@ -0,0 +1,161 @@ +File: packagePrivateStaticInterfaceMethod.Child.kt - 6d4a80a58cd119a48dce7fb750f29b03 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("javapackage") + DOT(".") + simpleIdentifier + Identifier("PublicParentClass") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("PublicParentClass") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("publicStaticMethod") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("PublicParentClass") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("publicStaticMethod") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("publicStaticField") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.Child.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.Child.antlrtree.txt new file mode 100644 index 000000000..92c3bed0e --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.Child.antlrtree.txt @@ -0,0 +1,87 @@ +File: packagePrivateStaticViaInternal.Child.kt - 1d5a981b6645ceef212230633e2e1344 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("javapackage") + DOT(".") + simpleIdentifier + Identifier("KotlinParentClass") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("KotlinParentClass") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("publicStaticMethod") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.javapackage_KotlinParentClass.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.javapackage_KotlinParentClass.antlrtree.txt new file mode 100644 index 000000000..5ad5a659b --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStaticViaInternal.javapackage_KotlinParentClass.antlrtree.txt @@ -0,0 +1,39 @@ +File: packagePrivateStaticViaInternal.javapackage_KotlinParentClass.kt - 4546e4b5fbc310d5bf5f657ae7c4fc26 + packageHeader + PACKAGE("package") + identifier + simpleIdentifier + Identifier("javapackage") + semi + NL("\n") + NL("\n") + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("KotlinParentClass") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("PackagePrivateGrandparentAbstractClass") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/packagePrivateStaticViaTypeAlias.foo.antlrtree.txt b/grammar/testData/diagnostics/visibility/packagePrivateStaticViaTypeAlias.foo.antlrtree.txt new file mode 100644 index 000000000..78e5de329 --- /dev/null +++ b/grammar/testData/diagnostics/visibility/packagePrivateStaticViaTypeAlias.foo.antlrtree.txt @@ -0,0 +1,181 @@ +File: packagePrivateStaticViaTypeAlias.foo.kt - c8fb12027b9ea7407fc72e9bfde24f63 + packageHeader + importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("javapackage") + DOT(".") + simpleIdentifier + Identifier("PublicParentClass") + semi + NL("\n") + NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("TypeAliasedParent") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("PublicParentClass") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TypeAliasedParent") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("publicStaticMethod") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Child") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("TypeAliasedParent") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TypeAliasedParent") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("publicStaticMethod") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("publicStaticMethod") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/visibility/smartCastAndSuppressedVisibility.antlrtree.txt b/grammar/testData/diagnostics/visibility/smartCastAndSuppressedVisibility.antlrtree.txt new file mode 100644 index 000000000..385d625ff --- /dev/null +++ b/grammar/testData/diagnostics/visibility/smartCastAndSuppressedVisibility.antlrtree.txt @@ -0,0 +1,323 @@ +File: smartCastAndSuppressedVisibility.kt - 0a11600a5c7e041163a46a904e23b1ed + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + visibilityModifier + INTERNAL("internal") + modifier + classModifier + SEALED("sealed") + CLASS("class") + simpleIdentifier + Identifier("B") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Suppress") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INVISIBLE_REFERENCE") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("INVISIBLE_MEMBER") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/incorrectCapturedApproximationForValueParameters.main.antlrtree.txt b/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/incorrectCapturedApproximationForValueParameters.main.antlrtree.txt new file mode 100644 index 000000000..2764d23f3 --- /dev/null +++ b/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/incorrectCapturedApproximationForValueParameters.main.antlrtree.txt @@ -0,0 +1,713 @@ +File: incorrectCapturedApproximationForValueParameters.main.kt - 68f0daca2aff61c6941a808d64f14789 + packageHeader + importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Inv") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAR("var") + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("WithExtension") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("ext") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("WithExtension") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("w") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("withInvStar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + functionType + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + DOT(".") + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("bar3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ext") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("withInvStar") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ext") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("bar4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Inv") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("ext") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("withInvStar") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ext") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningAfterSmartcast.antlrtree.txt b/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningAfterSmartcast.antlrtree.txt new file mode 100644 index 000000000..113fd9d05 --- /dev/null +++ b/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningAfterSmartcast.antlrtree.txt @@ -0,0 +1,245 @@ +File: noWarningAfterSmartcast.kt - 36a1d22c329947fd32dad3ccb07ba744 + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("Comp") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("t") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Comp") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + RANGLE(">") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("e") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + quest + QUEST_NO_WS("?") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("e") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningOnSAMAdaption.main.antlrtree.txt b/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningOnSAMAdaption.main.antlrtree.txt new file mode 100644 index 000000000..b9b3b8761 --- /dev/null +++ b/grammar/testData/diagnostics/warningsForBreakingChanges/capturedTypes/noWarningOnSAMAdaption.main.antlrtree.txt @@ -0,0 +1,141 @@ +File: noWarningOnSAMAdaption.main.kt - cb17508deb875bc35e6346af8ced3c6f + packageHeader + importList + topLevelObject + declaration + classDeclaration + FUN("fun") + INTERFACE("interface") + simpleIdentifier + Identifier("Action") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + DOT(".") + simpleIdentifier + Identifier("exec") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("tp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("TaskProvider") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("tp") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("configure") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/when/TypeParameterError.test.antlrtree.txt b/grammar/testData/diagnostics/when/TypeParameterError.test.antlrtree.txt new file mode 100644 index 000000000..0ed1877cc --- /dev/null +++ b/grammar/testData/diagnostics/when/TypeParameterError.test.antlrtree.txt @@ -0,0 +1,724 @@ +File: TypeParameterError.test.kt - 60a182ef88ee1234e1483ef91902549b + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("JsonObject") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SomeJsonObject") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("JsonObject") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("put") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JsonObject") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("node") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ObjectNode") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("node") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("node") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + NL("\n") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SomeJsonObject") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("node") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SomeJsonObject") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("TODO") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("values") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("values") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/when/TypeParameterWarning.test.antlrtree.txt b/grammar/testData/diagnostics/when/TypeParameterWarning.test.antlrtree.txt new file mode 100644 index 000000000..1894c4ede --- /dev/null +++ b/grammar/testData/diagnostics/when/TypeParameterWarning.test.antlrtree.txt @@ -0,0 +1,725 @@ +File: TypeParameterWarning.test.kt - 3fa1b4cae6b760ee2288b9f378bdebe8 + packageHeader + importList + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("JsonObject") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("SomeJsonObject") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("JsonObject") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + DOT(".") + simpleIdentifier + Identifier("put") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("JsonObject") + quest + QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("node") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ObjectNode") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("select") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("node") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + COMMA(",") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("node") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + NL("\n") + ELSE("else") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SomeJsonObject") + RPAREN(")") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + VALUE("value") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("node") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + SET("set") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("this") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + RPAREN(")") + semi + NL("\n") + whenEntry + whenCondition + typeTest + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("SomeJsonObject") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Unit") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("TODO") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("TODO") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("K") + RANGLE(">") + simpleIdentifier + Identifier("select") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("values") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("K") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("values") + postfixUnarySuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + semis + NL("\n") + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/when/flexibleEnumInSubject.main.antlrtree.txt b/grammar/testData/diagnostics/when/flexibleEnumInSubject.main.antlrtree.txt new file mode 100644 index 000000000..ef8cf682d --- /dev/null +++ b/grammar/testData/diagnostics/when/flexibleEnumInSubject.main.antlrtree.txt @@ -0,0 +1,711 @@ +File: flexibleEnumInSubject.main.kt - fe789f96ba0680114898b59629b98326 + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("EnumKotlin") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("KOTLIN_ONE") + COMMA(",") + enumEntry + simpleIdentifier + Identifier("KOTLIN_TWO") + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + companionObject + COMPANION("companion") + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("provide") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("EnumKotlin") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumKotlin") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("KOTLIN_ONE") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("ejp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("EnumJava") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("ekp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("EnumKotlin") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ejp") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumJava") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("JAVA_ONE") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ekp") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumKotlin") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("KOTLIN_ONE") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumJava") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumJava") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("JAVA_ONE") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumKotlin") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumKotlin") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("KOTLIN_ONE") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test_2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("ejp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("EnumJava") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("ekp") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("EnumKotlin") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ejp") + RPAREN(")") + LCURL("{") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("ekp") + RPAREN(")") + LCURL("{") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumProviderJava") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("EnumKotlin") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("provide") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/when/nonExhaustiveDependentContext.antlrtree.txt b/grammar/testData/diagnostics/when/nonExhaustiveDependentContext.antlrtree.txt new file mode 100644 index 000000000..78aa1ba68 --- /dev/null +++ b/grammar/testData/diagnostics/when/nonExhaustiveDependentContext.antlrtree.txt @@ -0,0 +1,315 @@ +File: nonExhaustiveDependentContext.kt - de834c699e5353362af2c70f7e3c2fa1 + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("bar") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + ARROW("->") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("a") + QUOTE_CLOSE(""") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + equalityOperator + EQEQ("==") + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("b") + QUOTE_CLOSE(""") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semi + NL("\n") + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/when/whenOverEnumWithSameNameAsEntry.antlrtree.txt b/grammar/testData/diagnostics/when/whenOverEnumWithSameNameAsEntry.antlrtree.txt new file mode 100644 index 000000000..748d3ae4a --- /dev/null +++ b/grammar/testData/diagnostics/when/whenOverEnumWithSameNameAsEntry.antlrtree.txt @@ -0,0 +1,207 @@ +File: whenOverEnumWithSameNameAsEntry.kt - c62f2a20140dd14aabb3658d06929629 + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("A") + enumClassBody + LCURL("{") + NL("\n") + enumEntries + enumEntry + simpleIdentifier + Identifier("A") + COMMA(",") + NL("\n") + enumEntry + simpleIdentifier + Identifier("B") + COMMA(",") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("A") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("A") + QUOTE_CLOSE(""") + semi + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("A") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("B") + ARROW("->") + controlStructureBody + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("B") + QUOTE_CLOSE(""") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") diff --git a/grammar/testData/diagnostics/whileConditionExpectedType.antlrtree.txt b/grammar/testData/diagnostics/whileConditionExpectedType.antlrtree.txt new file mode 100644 index 000000000..43e2280ef --- /dev/null +++ b/grammar/testData/diagnostics/whileConditionExpectedType.antlrtree.txt @@ -0,0 +1,266 @@ +File: whileConditionExpectedType.kt - aedf956731ef5085174133c52d77e30b + NL("\n") + NL("\n") + NL("\n") + packageHeader + importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + whileStatement + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + statement + loopStatement + doWhileStatement + DO("do") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + WHILE("while") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + whenExpression + WHEN("when") + whenSubject + LPAREN("(") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("it") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + LCURL("{") + NL("\n") + whenEntry + whenCondition + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("materialize") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + whenEntry + ELSE("else") + ARROW("->") + controlStructureBody + block + LCURL("{") + statements + RCURL("}") + semi + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + EOF("") From c3533a777efe7f64655f0273d883b7e9644b6d0b Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Wed, 26 Jul 2023 17:02:40 +0200 Subject: [PATCH 13/22] [1.9] Remove obsolete grammar tests --- ...vaRepeatableJvmTarget6.usage.antlrtree.txt | 82 - .../enum/enumEntriesAmbiguity.antlrtree.txt | 69 - .../allowExpressionAfterTypeReference.diff | 1 - .../forbidExpressionAfterTypeReference.diff | 1 - ...textReceiversOnInlineClasses.antlrtree.txt | 45 - .../setterProjectedOutAssign.antlrtree.txt | 262 - .../lateinitInlineClasses.antlrtree.txt | 89 - .../const/enumConstName.antlrtree.txt | 210 - .../modifiers/const/ifConstVal.antlrtree.txt | 999 ---- .../modifiers/const/kCallable.antlrtree.txt | 583 --- ...torsInComplexModuleStructure.antlrtree.txt | 142 - .../numbers/kt48361_disabled.antlrtree.txt | 116 - .../numbers/kt48361_enabled.antlrtree.txt | 116 - ...eratorsResolution_newResolve.antlrtree.txt | 4480 ----------------- ...PropertyReference.KotlinFile.antlrtree.txt | 128 - ...ndConstructsInsideValueClass.antlrtree.txt | 1013 ---- 16 files changed, 8336 deletions(-) delete mode 100644 grammar/testData/diagnostics/annotations/repeatable/javaRepeatableJvmTarget6.usage.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/enum/enumEntriesAmbiguity.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/expressionAfterTypeReference/allowExpressionAfterTypeReference.diff delete mode 100644 grammar/testData/diagnostics/expressionAfterTypeReference/forbidExpressionAfterTypeReference.diff delete mode 100644 grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnInlineClasses.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/inlineClasses/lateinitInlineClasses.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/modifiers/const/enumConstName.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/modifiers/const/ifConstVal.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/modifiers/const/kCallable.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/numbers/kt48361_disabled.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/numbers/kt48361_enabled.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_newResolve.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/syntheticExtensions/javaProperties/PartiallySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt delete mode 100644 grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideValueClass.antlrtree.txt diff --git a/grammar/testData/diagnostics/annotations/repeatable/javaRepeatableJvmTarget6.usage.antlrtree.txt b/grammar/testData/diagnostics/annotations/repeatable/javaRepeatableJvmTarget6.usage.antlrtree.txt deleted file mode 100644 index 1eb5c3510..000000000 --- a/grammar/testData/diagnostics/annotations/repeatable/javaRepeatableJvmTarget6.usage.antlrtree.txt +++ /dev/null @@ -1,82 +0,0 @@ -File: javaRepeatableJvmTarget6.usage.kt - 3cdb75b68dfefe3462c1826925c7631e - packageHeader - importList - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_NO_WS("@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("Runtime") - annotation - singleAnnotation - AT_PRE_WS(" @") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("Runtime") - NL("\n") - CLASS("class") - simpleIdentifier - Identifier("UseRuntime") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("Clazz") - annotation - singleAnnotation - AT_PRE_WS(" @") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("Clazz") - NL("\n") - CLASS("class") - simpleIdentifier - Identifier("UseClazz") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("Source") - annotation - singleAnnotation - AT_PRE_WS(" @") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("Source") - NL("\n") - CLASS("class") - simpleIdentifier - Identifier("UseSource") - semis - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/enum/enumEntriesAmbiguity.antlrtree.txt b/grammar/testData/diagnostics/enum/enumEntriesAmbiguity.antlrtree.txt deleted file mode 100644 index 978102338..000000000 --- a/grammar/testData/diagnostics/enum/enumEntriesAmbiguity.antlrtree.txt +++ /dev/null @@ -1,69 +0,0 @@ -File: enumEntriesAmbiguity.kt - 17540ad8dc654e58ddc8279dfd9d29d9 - NL("\n") - NL("\n") - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - classDeclaration - modifiers - modifier - classModifier - ENUM("enum") - CLASS("class") - simpleIdentifier - Identifier("Ambiguous") - enumClassBody - LCURL("{") - NL("\n") - enumEntries - enumEntry - simpleIdentifier - Identifier("first") - COMMA(",") - enumEntry - simpleIdentifier - Identifier("entries") - SEMICOLON(";") - NL("\n") - classMemberDeclarations - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("Ambiguous") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("entries") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/expressionAfterTypeReference/allowExpressionAfterTypeReference.diff b/grammar/testData/diagnostics/expressionAfterTypeReference/allowExpressionAfterTypeReference.diff deleted file mode 100644 index 77e502855..000000000 --- a/grammar/testData/diagnostics/expressionAfterTypeReference/allowExpressionAfterTypeReference.diff +++ /dev/null @@ -1 +0,0 @@ -Needs handling of '>=' as two separate tokens \ No newline at end of file diff --git a/grammar/testData/diagnostics/expressionAfterTypeReference/forbidExpressionAfterTypeReference.diff b/grammar/testData/diagnostics/expressionAfterTypeReference/forbidExpressionAfterTypeReference.diff deleted file mode 100644 index 77e502855..000000000 --- a/grammar/testData/diagnostics/expressionAfterTypeReference/forbidExpressionAfterTypeReference.diff +++ /dev/null @@ -1 +0,0 @@ -Needs handling of '>=' as two separate tokens \ No newline at end of file diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnInlineClasses.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnInlineClasses.antlrtree.txt deleted file mode 100644 index cc6f89d29..000000000 --- a/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnInlineClasses.antlrtree.txt +++ /dev/null @@ -1,45 +0,0 @@ -File: noContextReceiversOnInlineClasses.kt - aab8d11f630cb30f89124e96739ed824 (WITH_ERRORS) - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - classDeclaration - CLASS("class") - simpleIdentifier - Identifier("A") - semis - NL("\n") - NL("\n") - Identifier("context") - LPAREN("(") - Identifier("A") - RPAREN(")") - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - modifier - functionModifier - INLINE("inline") - CLASS("class") - simpleIdentifier - Identifier("B") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - EOF("") diff --git a/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.antlrtree.txt b/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.antlrtree.txt deleted file mode 100644 index 19bc2e570..000000000 --- a/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutAssign.antlrtree.txt +++ /dev/null @@ -1,262 +0,0 @@ -File: setterProjectedOutAssign.kt - 5ba660243500e3bb74987449c37ef625 - NL("\n") - NL("\n") - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - classDeclaration - INTERFACE("interface") - simpleIdentifier - Identifier("Tr") - typeParameters - LANGLE("<") - typeParameter - simpleIdentifier - Identifier("T") - RANGLE(">") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("T") - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("test") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("t") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Tr") - typeArguments - LANGLE("<") - typeProjection - MULT("*") - RANGLE(">") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - assignment - directlyAssignableExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("t") - assignableSuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("v") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - NullLiteral("null") - postfixUnarySuffix - postfixUnaryOperator - EXCL_NO_WS("!") - excl - EXCL_NO_WS("!") - semis - NL("\n") - statement - assignment - directlyAssignableExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("t") - assignableSuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("v") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") - semis - NL("\n") - statement - assignment - directlyAssignableExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("t") - assignableSuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("v") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - NullLiteral("null") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("t") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("v") - simpleIdentifier - Identifier("checkType") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - functionLiteral - lambdaLiteral - LCURL("{") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("_") - postfixUnarySuffix - typeArguments - LANGLE("<") - typeProjection - type - nullableType - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - quest - QUEST_NO_WS("?") - RANGLE(">") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RCURL("}") - semis - NL("\n") - RCURL("}") - EOF("") diff --git a/grammar/testData/diagnostics/inlineClasses/lateinitInlineClasses.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/lateinitInlineClasses.antlrtree.txt deleted file mode 100644 index 07113bffc..000000000 --- a/grammar/testData/diagnostics/inlineClasses/lateinitInlineClasses.antlrtree.txt +++ /dev/null @@ -1,89 +0,0 @@ -File: lateinitInlineClasses.kt - 78595686f59de4986d98a729a5160ed5 - NL("\n") - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - classDeclaration - modifiers - modifier - functionModifier - INLINE("inline") - CLASS("class") - simpleIdentifier - Identifier("Foo") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - LATEINIT("lateinit") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Foo") - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("foo") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - declaration - propertyDeclaration - modifiers - modifier - memberModifier - LATEINIT("lateinit") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Foo") - NL("\n") - RCURL("}") - EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/enumConstName.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/enumConstName.antlrtree.txt deleted file mode 100644 index 7b2ff70f8..000000000 --- a/grammar/testData/diagnostics/modifiers/const/enumConstName.antlrtree.txt +++ /dev/null @@ -1,210 +0,0 @@ -File: enumConstName.kt - d2aeea841376aeea9d5620c58e1509f1 - packageHeader - importList - topLevelObject - declaration - classDeclaration - modifiers - modifier - classModifier - ENUM("enum") - CLASS("class") - simpleIdentifier - Identifier("EnumClass") - enumClassBody - LCURL("{") - NL("\n") - enumEntries - enumEntry - simpleIdentifier - Identifier("OK") - COMMA(",") - enumEntry - simpleIdentifier - Identifier("VALUE") - COMMA(",") - enumEntry - simpleIdentifier - Identifier("anotherValue") - COMMA(",") - enumEntry - simpleIdentifier - Identifier("WITH_UNDERSCORE") - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("name1") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("EnumClass") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("OK") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("name2") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("EnumClass") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("VALUE") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("name3") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("EnumClass") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("anotherValue") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("name4") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("EnumClass") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("WITH_UNDERSCORE") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/ifConstVal.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/ifConstVal.antlrtree.txt deleted file mode 100644 index 37a11391e..000000000 --- a/grammar/testData/diagnostics/modifiers/const/ifConstVal.antlrtree.txt +++ /dev/null @@ -1,999 +0,0 @@ -File: ifConstVal.kt - 87a594b9e6d3f047bbaf7e32148ee33d - packageHeader - importList - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("flag") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - VALUE("value") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("10") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("condition") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - ifExpression - IF("if") - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("flag") - RPAREN(")") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("True") - QUOTE_CLOSE(""") - ELSE("else") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("Error") - QUOTE_CLOSE(""") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("withWhen") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - whenExpression - WHEN("when") - whenSubject - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("flag") - RPAREN(")") - LCURL("{") - NL("\n") - whenEntry - whenCondition - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("True") - QUOTE_CLOSE(""") - semi - NL("\n") - whenEntry - ELSE("else") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("Error") - QUOTE_CLOSE(""") - semi - NL("\n") - RCURL("}") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("withWhen2") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - whenExpression - WHEN("when") - LCURL("{") - NL("\n") - whenEntry - whenCondition - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("flag") - equalityOperator - EQEQ("==") - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("True") - QUOTE_CLOSE(""") - semi - NL("\n") - whenEntry - ELSE("else") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("Error") - QUOTE_CLOSE(""") - semi - NL("\n") - RCURL("}") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("withWhen3") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - whenExpression - WHEN("when") - whenSubject - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - VALUE("value") - RPAREN(")") - LCURL("{") - NL("\n") - whenEntry - whenCondition - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("10") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("1") - QUOTE_CLOSE(""") - semi - NL("\n") - whenEntry - whenCondition - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("100") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("2") - QUOTE_CLOSE(""") - semi - NL("\n") - whenEntry - ELSE("else") - ARROW("->") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("3") - QUOTE_CLOSE(""") - semi - NL("\n") - RCURL("}") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("multibranchIf") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - ifExpression - IF("if") - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - VALUE("value") - equalityOperator - EQEQ("==") - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("100") - RPAREN(")") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - ELSE("else") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - ifExpression - IF("if") - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - VALUE("value") - equalityOperator - EQEQ("==") - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1000") - RPAREN(")") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - ELSE("else") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("3") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("nonConstFlag") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("errorConstIf") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - ifExpression - IF("if") - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("nonConstFlag") - RPAREN(")") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - ELSE("else") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("errorBranch") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - ifExpression - IF("if") - LPAREN("(") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("flag") - RPAREN(")") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("nonConstFlag") - ELSE("else") - controlStructureBody - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("false") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/modifiers/const/kCallable.antlrtree.txt b/grammar/testData/diagnostics/modifiers/const/kCallable.antlrtree.txt deleted file mode 100644 index 4f3d1b7d6..000000000 --- a/grammar/testData/diagnostics/modifiers/const/kCallable.antlrtree.txt +++ /dev/null @@ -1,583 +0,0 @@ -File: kCallable.kt - 2f4e8d18c84d80fc9ea5a0668c0a64ed - packageHeader - importList - topLevelObject - declaration - classDeclaration - CLASS("class") - simpleIdentifier - Identifier("SomeClassWithName") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - PROPERTY("property") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("anotherProperty") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("String") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") - NL("\n") - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("foo") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("bar") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - COMMA(",") - functionValueParameter - parameter - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Double") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("String") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("className") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - callableReference - COLONCOLON("::") - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("propName") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - PROPERTY("property") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("anotherPropName") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - Identifier("anotherProperty") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("fooName") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - Identifier("foo") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("barName") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - Identifier("bar") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("stringClassName") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - callableReference - COLONCOLON("::") - simpleIdentifier - Identifier("String") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("lengthPropName") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("String") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - Identifier("length") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("errorAccess") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - PROPERTY("property") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("name") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("errorPlus") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") - additiveOperator - ADD("+") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("SomeClassWithName") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - PROPERTY("property") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.antlrtree.txt deleted file mode 100644 index 139800f9e..000000000 --- a/grammar/testData/diagnostics/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.antlrtree.txt +++ /dev/null @@ -1,142 +0,0 @@ -File: sealedInheritorsInComplexModuleStructure.kt - 4c1e81cd4113a2af8a8293a0b1270394 (WITH_ERRORS) - NL("\n") - NL("\n") - NL("\n") - NL("\n") - packageHeader - PACKAGE("package") - identifier - simpleIdentifier - Identifier("foo") - semi - NL("\n") - NL("\n") - importList - topLevelObject - declaration - classDeclaration - modifiers - modifier - platformModifier - EXPECT("expect") - modifier - classModifier - SEALED("sealed") - CLASS("class") - simpleIdentifier - Identifier("SealedWithSharedActual") - primaryConstructor - classParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - modifier - platformModifier - EXPECT("expect") - modifier - classModifier - SEALED("sealed") - CLASS("class") - simpleIdentifier - Identifier("SealedWithPlatformActuals") - COLON(":") - delegationSpecifiers - annotatedDelegationSpecifier - delegationSpecifier - userType - simpleUserType - simpleIdentifier - Identifier("SealedWithSharedActual") - semis - NL("\n") - NL("\n") - NL("\n") - NL("\n") - PACKAGE("package") - Identifier("foo") - NL("\n") - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - modifier - platformModifier - ACTUAL("actual") - modifier - classModifier - SEALED("sealed") - CLASS("class") - simpleIdentifier - Identifier("SealedWithSharedActual") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - CLASS("class") - simpleIdentifier - Identifier("SimpleShared") - COLON(":") - delegationSpecifiers - annotatedDelegationSpecifier - delegationSpecifier - constructorInvocation - userType - simpleUserType - simpleIdentifier - Identifier("SealedWithPlatformActuals") - valueArguments - LPAREN("(") - RPAREN(")") - semis - NL("\n") - NL("\n") - NL("\n") - NL("\n") - PACKAGE("package") - Identifier("foo") - NL("\n") - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - modifier - platformModifier - ACTUAL("actual") - modifier - classModifier - SEALED("sealed") - CLASS("class") - simpleIdentifier - Identifier("SealedWithPlatformActuals") - primaryConstructor - modifiers - modifier - platformModifier - ACTUAL("actual") - CONSTRUCTOR("constructor") - classParameters - LPAREN("(") - RPAREN(")") - COLON(":") - delegationSpecifiers - annotatedDelegationSpecifier - delegationSpecifier - constructorInvocation - userType - simpleUserType - simpleIdentifier - Identifier("SealedWithSharedActual") - valueArguments - LPAREN("(") - RPAREN(")") - semis - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/numbers/kt48361_disabled.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt48361_disabled.antlrtree.txt deleted file mode 100644 index 68177206b..000000000 --- a/grammar/testData/diagnostics/numbers/kt48361_disabled.antlrtree.txt +++ /dev/null @@ -1,116 +0,0 @@ -File: kt48361_disabled.kt - 5a90994e517b39c33f62a886fc32901e - NL("\n") - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("foo") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("ttlMillis") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Long") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("5") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("60") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1000") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("cacheSize") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Long") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("4096") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("4") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/numbers/kt48361_enabled.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt48361_enabled.antlrtree.txt deleted file mode 100644 index 9ee6be8cf..000000000 --- a/grammar/testData/diagnostics/numbers/kt48361_enabled.antlrtree.txt +++ /dev/null @@ -1,116 +0,0 @@ -File: kt48361_enabled.kt - 7f82c03bf1e738a01f3719895f2ff90e - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("foo") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("ttlMillis") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Long") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("5") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("60") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1000") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - propertyModifier - CONST("const") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("cacheSize") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Long") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("4096") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("4") - NL("\n") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_newResolve.antlrtree.txt b/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_newResolve.antlrtree.txt deleted file mode 100644 index 84729b1f0..000000000 --- a/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_newResolve.antlrtree.txt +++ /dev/null @@ -1,4480 +0,0 @@ -File: newLiteralOperatorsResolution_newResolve.kt - 8eb2abcbf91ead9e86c5801618f7c22e - NL("\n") - NL("\n") - NL("\n") - NL("\n") - packageHeader - importList - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("takeByte") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Byte") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("takeInt") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("takeLong") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Long") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testByteBinaryOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - additiveOperator - ADD("+") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - additiveOperator - SUB("-") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - DIV("/") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MOD("%") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("plus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("minus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("times") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("div") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("rem") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("shl") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("shr") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("ushr") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("and") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("or") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("xor") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testByteUnaryOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - unaryPrefix - prefixUnaryOperator - ADD("+") - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - unaryPrefix - prefixUnaryOperator - SUB("-") - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("unaryPlus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("unaryMinus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("inv") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("inc") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("dec") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testLongBinaryOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - additiveOperator - ADD("+") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - additiveOperator - SUB("-") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - DIV("/") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MOD("%") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("plus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("minus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("times") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("div") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("rem") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("shl") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("shr") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("ushr") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("and") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("or") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("xor") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("100000000000") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testLongUnaryOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - unaryPrefix - prefixUnaryOperator - ADD("+") - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - unaryPrefix - prefixUnaryOperator - SUB("-") - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("unaryPlus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("unaryMinus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("inv") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("inc") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("dec") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testIntBinaryOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - additiveOperator - ADD("+") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - additiveOperator - SUB("-") - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MULT("*") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - DIV("/") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - multiplicativeOperator - MOD("%") - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("plus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("minus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("times") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("div") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("rem") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("shl") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("shr") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("ushr") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("and") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("or") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - simpleIdentifier - Identifier("xor") - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testIntUnaryOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - unaryPrefix - prefixUnaryOperator - ADD("+") - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - unaryPrefix - prefixUnaryOperator - SUB("-") - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("unaryPlus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("unaryMinus") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("2") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("inv") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("inc") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("dec") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("testNoOperators") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeByte") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeInt") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("takeLong") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/syntheticExtensions/javaProperties/PartiallySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt b/grammar/testData/diagnostics/syntheticExtensions/javaProperties/PartiallySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt deleted file mode 100644 index 72c9edd07..000000000 --- a/grammar/testData/diagnostics/syntheticExtensions/javaProperties/PartiallySupportedSyntheticJavaPropertyReference.KotlinFile.antlrtree.txt +++ /dev/null @@ -1,128 +0,0 @@ -File: PartiallySupportedSyntheticJavaPropertyReference.KotlinFile.kt - bff0bfaa4a674ba084ac176132490a8c - packageHeader - importList - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("call") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("c") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("test") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("JavaClass") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - Identifier("foo") - semis - NL("\n") - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("call") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("JavaClass") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - COLONCOLON("::") - simpleIdentifier - Identifier("foo") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - EOF("") diff --git a/grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideValueClass.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideValueClass.antlrtree.txt deleted file mode 100644 index feb3c63e6..000000000 --- a/grammar/testData/diagnostics/valueClasses/reservedMembersAndConstructsInsideValueClass.antlrtree.txt +++ /dev/null @@ -1,1013 +0,0 @@ -File: reservedMembersAndConstructsInsideValueClass.kt - c4401354e144b698045951f534b989b1 - NL("\n") - NL("\n") - NL("\n") - NL("\n") - packageHeader - PACKAGE("package") - identifier - simpleIdentifier - Identifier("kotlin") - DOT(".") - simpleIdentifier - Identifier("jvm") - semi - NL("\n") - NL("\n") - importList - topLevelObject - declaration - classDeclaration - modifiers - modifier - classModifier - ANNOTATION("annotation") - CLASS("class") - simpleIdentifier - Identifier("JvmInline") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("JvmInline") - NL("\n") - modifier - classModifier - VALUE("value") - CLASS("class") - simpleIdentifier - Identifier("IC1") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("unbox") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("unbox") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - FUN("fun") - simpleIdentifier - Identifier("equals") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("other") - COLON(":") - type - nullableType - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - quest - QUEST_NO_WS("?") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Boolean") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - FUN("fun") - simpleIdentifier - Identifier("hashCode") - functionValueParameters - LPAREN("(") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("JvmInline") - NL("\n") - modifier - classModifier - VALUE("value") - CLASS("class") - simpleIdentifier - Identifier("IC2") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("TODO") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - semis - NL("\n") - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("unbox") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("unbox") - functionValueParameters - LPAREN("(") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("TODO") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - semis - NL("\n") - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("equals") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("my") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - COMMA(",") - functionValueParameter - parameter - simpleIdentifier - Identifier("other") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Boolean") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("hashCode") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("JvmInline") - NL("\n") - modifier - classModifier - VALUE("value") - CLASS("class") - simpleIdentifier - Identifier("IC3") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("TODO") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - semis - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("unbox") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("x") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Any") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("TODO") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - semis - NL("\n") - NL("\n") - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("equals") - functionValueParameters - LPAREN("(") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Boolean") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - BooleanLiteral("true") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - classDeclaration - INTERFACE("interface") - simpleIdentifier - Identifier("WithBox") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("String") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("JvmInline") - NL("\n") - modifier - classModifier - VALUE("value") - CLASS("class") - simpleIdentifier - Identifier("IC4") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("s") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("String") - RPAREN(")") - COLON(":") - delegationSpecifiers - annotatedDelegationSpecifier - delegationSpecifier - userType - simpleUserType - simpleIdentifier - Identifier("WithBox") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - declaration - functionDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - FUN("fun") - simpleIdentifier - Identifier("box") - functionValueParameters - LPAREN("(") - RPAREN(")") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("String") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - classDeclaration - modifiers - annotation - singleAnnotation - AT_PRE_WS("\n@") - unescapedAnnotation - userType - simpleUserType - simpleIdentifier - Identifier("JvmInline") - NL("\n") - modifier - classModifier - VALUE("value") - CLASS("class") - simpleIdentifier - Identifier("IC5") - primaryConstructor - classParameters - LPAREN("(") - classParameter - VAL("val") - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("String") - RPAREN(")") - classBody - LCURL("{") - NL("\n") - classMemberDeclarations - classMemberDeclaration - secondaryConstructor - CONSTRUCTOR("constructor") - functionValueParameters - LPAREN("(") - functionValueParameter - parameter - simpleIdentifier - Identifier("i") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - COLON(":") - constructorDelegationCall - THIS("this") - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("toString") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - RPAREN(")") - RPAREN(")") - block - LCURL("{") - NL("\n") - statements - statement - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("TODO") - postfixUnarySuffix - callSuffix - valueArguments - LPAREN("(") - valueArgument - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - lineStringContent - LineStrText("something") - QUOTE_CLOSE(""") - RPAREN(")") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - RCURL("}") - semis - NL("\n") - EOF("") From 117d1a5cc59565b2561d29b0ee4187404fb22115 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Wed, 26 Jul 2023 17:23:09 +0200 Subject: [PATCH 14/22] [1.9] Add changed grammar tests --- ...reeFunctionCalledAsExtension.antlrtree.txt | 19 +- .../FunctionCalleeExpressions.antlrtree.txt | 3 +- .../testData/diagnostics/IncDec.antlrtree.txt | 3 +- .../OverridenSetterVisibility.antlrtree.txt | 3 +- .../SafeCallNonNullReceiver.antlrtree.txt | 3 +- .../TraitWithConstructor.antlrtree.txt | 3 +- .../annotations/ConstructorCall.antlrtree.txt | 3 +- .../expressions/divide.antlrtree.txt | 3 +- .../expressions/intrincics.antlrtree.txt | 3 +- .../parameters/expressions/long.antlrtree.txt | 3 +- .../expressions/maxValueByte.antlrtree.txt | 3 +- .../expressions/maxValueInt.antlrtree.txt | 3 +- .../expressions/miltiply.antlrtree.txt | 3 +- .../expressions/minus.antlrtree.txt | 3 +- .../parameters/expressions/mod.antlrtree.txt | 3 +- .../parameters/expressions/plus.antlrtree.txt | 3 +- .../expressions/stringTemplate.antlrtree.txt | 3 +- .../expressions/strings.antlrtree.txt | 3 +- .../GetterAnnotations.antlrtree.txt | 57 +- .../PropertyAnnotations.antlrtree.txt | 3 +- .../withUseSiteTarget/kt23992.antlrtree.txt | 3 +- .../kt23992_after.antlrtree.txt | 3 +- .../kt26638_after.antlrtree.txt | 3 +- ...getOnExtensionFunction_after.antlrtree.txt | 3 +- ...ParamAnnotationsOnTypesError.antlrtree.txt | 3 +- ...aramAnnotationsOnTypes_after.antlrtree.txt | 3 +- .../InitCustomSetter.antlrtree.txt | 3 +- .../callableReference/bareType.antlrtree.txt | 3 +- .../reservedExpressionSyntax3.antlrtree.txt | 83 +- .../callableReference/kt37530.antlrtree.txt | 3 +- .../property/backingField.antlrtree.txt | 3 +- .../kt7945_unrelatedClass.antlrtree.txt | 3 +- .../bare/NullableAsNotEnough.antlrtree.txt | 3 +- .../cast/bare/UnrelatedAs.antlrtree.txt | 3 +- .../checkArguments/kt49276.antlrtree.txt | 4 +- .../checkArguments/kt49276Error.antlrtree.txt | 3 +- .../twoLambdasFunction.antlrtree.txt | 3 +- .../nonClassesOnLHS.antlrtree.txt | 3 +- .../unresolvedClass.antlrtree.txt | 3 +- ...LiteralsOutsideOfAnnotations.antlrtree.txt | 3 +- .../defaultValuesInAnnotation.antlrtree.txt | 124 +- ...ializedOrReassignedVariables.antlrtree.txt | 201 +- .../deadCodeInLocalDeclarations.antlrtree.txt | 3 +- .../controlFlowAnalysis/kt2960.antlrtree.txt | 5 +- ...nitializedQualifiedEnumEntry.antlrtree.txt | 3 +- .../outsideSuspend.antlrtree.txt | 3 +- ...linHiddenOnReferenceArgument.antlrtree.txt | 3 +- ...dSinceKotlinWithoutArguments.antlrtree.txt | 3 +- .../hidden.antlrtree.txt | 3 +- .../warning.antlrtree.txt | 3 +- .../genericConstructorUsage.antlrtree.txt | 3 +- .../typealiasConstructor.antlrtree.txt | 3 +- .../typealiasForDeprecatedClass.antlrtree.txt | 4 +- .../enumMembers.antlrtree.txt | 3 +- ...incompatibleEnumEntryClasses.antlrtree.txt | 3 +- .../binaryMinusDepOnExpType.antlrtree.txt | 3 +- .../numberBinaryOperations.antlrtree.txt | 3 +- .../numberBinaryOperationsCall.antlrtree.txt | 3 +- ...berBinaryOperationsInfixCall.antlrtree.txt | 3 +- .../evaluate/parentesized.antlrtree.txt | 3 +- .../approximation.antlrtree.txt | 3 +- .../recursiveBounds.antlrtree.txt | 48 +- .../reifiedArguments.antlrtree.txt | 213 +- .../simple.antlrtree.txt | 3 +- .../protectedInProtected.antlrtree.txt | 124 +- .../fromKEEP/functionalType.antlrtree.txt | 3 +- ...extensionMemberInClassObject.antlrtree.txt | 3 +- ...funInterfaceDeclarationCheck.antlrtree.txt | 3 +- .../functionLiterals/kt47493.antlrtree.txt | 3 +- ...ianceInAliasedFunctionalType.antlrtree.txt | 3 +- ...tterProjectedOutNoPlusAssign.antlrtree.txt | 5 +- .../CheckJavaVisibility.k2.antlrtree.txt | 4 +- ...FromCurrentWithDifferentName.antlrtree.txt | 3 +- .../OptionalAnnotationClasses.antlrtree.txt | 4 +- .../checkBackingFieldException.antlrtree.txt | 4 +- .../builderInference/kt47986_2.antlrtree.txt | 4 +- ...ltiLambdaRestrictionDisabled.antlrtree.txt | 5 +- ...cionWithExpectedTypeAndBound.antlrtree.txt | 3 +- .../coercionWithoutExpectedType.antlrtree.txt | 3 +- ...rectCoercionWithExpectedType.antlrtree.txt | 3 +- ...ParameterOfAnonymousFunction.antlrtree.txt | 3 +- .../kt45461_10.antlrtree.txt | 3 +- .../kt45461_12.antlrtree.txt | 4 +- .../kt45461_13.antlrtree.txt | 3 +- .../kt45461_2.antlrtree.txt | 6 +- .../kt45461_21.antlrtree.txt | 2 +- .../kt45461_24.antlrtree.txt | 2 +- .../kt45461_28.antlrtree.txt | 3 +- .../kt45461_29.antlrtree.txt | 3 +- .../kt45461_30.antlrtree.txt | 3 +- .../kt45461_31.antlrtree.txt | 3 +- .../kt45461_32.antlrtree.txt | 3 +- .../kt45461_33.antlrtree.txt | 3 +- .../kt45461_34.antlrtree.txt | 3 +- .../kt45461_35.antlrtree.txt | 3 +- .../kt45461_35_Enabled.antlrtree.txt | 3 +- .../kt52393.antlrtree.txt | 4 +- .../substitutingSuperTypes.antlrtree.txt | 3 +- .../substitutingSuperTypes2.antlrtree.txt | 3 +- .../hasErrorInConstrainingTypes.antlrtree.txt | 3 +- ...xpectedTypeForLambdaArgument.antlrtree.txt | 3 +- ...thMaterializeAndExpectedType.antlrtree.txt | 3 +- .../localFactorial.antlrtree.txt | 3 +- .../recursiveFun.antlrtree.txt | 3 +- .../recursiveLambda.antlrtree.txt | 3 +- .../recursiveLocalFuns/selfCall.antlrtree.txt | 3 +- .../regressions/kt2057.antlrtree.txt | 3 +- .../regressions/kt2841.antlrtree.txt | 3 +- .../regressions/kt2841_it.antlrtree.txt | 3 +- .../regressions/kt2841_it_this.antlrtree.txt | 3 +- .../regressions/kt2841_this.antlrtree.txt | 3 +- .../regressions/kt37419.antlrtree.txt | 3 +- .../regressions/kt41386.antlrtree.txt | 3 +- ...esolvedReferenceAsUnresolved.antlrtree.txt | 3 +- ...ityForDifferentFunctionTypes.antlrtree.txt | 3 +- ...peOfSingleExpressionFunction.antlrtree.txt | 1003 +++++++- ...oredTypeInForbiddenPositions.antlrtree.txt | 58 +- .../defaultLambdaInlining.antlrtree.txt | 3 +- .../mathOperation.antlrtree.txt | 3 +- ...lsWithoutArtifactOnClasspath.antlrtree.txt | 3 +- .../inner/constructorAccess.antlrtree.txt | 3 +- .../constructNestedClass.antlrtree.txt | 3 +- .../constantUnaryOperators.antlrtree.txt | 3 +- .../diagnostics/kt11167.antlrtree.txt | 3 +- .../diagnostics/kt49438.antlrtree.txt | 3 +- ...alsOverrideInActualInterface.antlrtree.txt | 3 +- ...enericClassImplTypeAlias.jvm.antlrtree.txt | 218 +- ...ledInheritorsInComplexModuleStructure.diff | 0 .../safeCallOnNotNullableType.antlrtree.txt | 3 +- .../diagnostics/numbers/kt47447.antlrtree.txt | 3 +- .../diagnostics/numbers/kt47729.antlrtree.txt | 3 +- .../numbers/kt47729_parenthesis.antlrtree.txt | 3 +- ...ReceiverWithIntegerValueType.antlrtree.txt | 3 +- ...lOperatorsResolution_warning.antlrtree.txt | 3 +- ...ceComplexCasesWithImportsOld.antlrtree.txt | 5 +- ...lexCasesWithQualificationOld.antlrtree.txt | 5 +- .../modWithRemAssign.antlrtree.txt | 3 +- .../preferRemAsExtentionOverMod.antlrtree.txt | 3 +- .../preferRemAsMemberOverMod.antlrtree.txt | 3 +- ...emFromCompanionObjectOverRem.antlrtree.txt | 3 +- ...erRemOverModInLocalFunctions.antlrtree.txt | 3 +- ...eferRemWithImplicitReceivers.antlrtree.txt | 3 +- ...eRemAsExtensionOverMemberMod.antlrtree.txt | 3 +- .../remWithModAndModAssign.antlrtree.txt | 3 +- .../remWithModAssign.antlrtree.txt | 3 +- ...ctionSignatureFromSuperclass.antlrtree.txt | 3 +- ...aultParameterValueInOverride.antlrtree.txt | 3 +- .../FakeOverrideModality3.antlrtree.txt | 3 +- .../clashesOnInheritance/kt9550.antlrtree.txt | 3 +- .../explicitGetterType.antlrtree.txt | 3 +- ...etterWithPublicSetter.k_test.antlrtree.txt | 2166 ++++++++++++++++- .../regressions/kt10843.antlrtree.txt | 3 +- .../regressions/kt2768.antlrtree.txt | 3 +- .../regressions/kt4827.antlrtree.txt | 3 +- .../regressions/kt9384.antlrtree.txt | 3 +- .../resolve/noCandidates/kt2787.antlrtree.txt | 5 +- .../resolvedToClassifier.antlrtree.txt | 243 +- .../classHeader/delegation.antlrtree.txt | 3 +- .../superConstructorArguments.antlrtree.txt | 3 +- .../scopes/invisibleSetter.antlrtree.txt | 5 +- ...icFromInnerExtendingSameBase.antlrtree.txt | 3 +- ...cFromInnerExtendingSameBase2.antlrtree.txt | 3 +- .../accessBaseWithSameExtension.antlrtree.txt | 3 +- ...GenericBaseWithSameExtension.antlrtree.txt | 3 +- .../operatorCall.antlrtree.txt | 3 +- .../thisAsExtensionReceiver.antlrtree.txt | 3 +- ...InitializationWithoutPrimary.antlrtree.txt | 3 +- ...esolutionErrorOnImplicitOnce.antlrtree.txt | 3 +- .../smartCasts/elvis/basicOff.antlrtree.txt | 5 +- .../loops/doWhileEarlyContinue.antlrtree.txt | 3 +- .../noMultiplatformProjects.antlrtree.txt | 194 +- .../finalize.antlrtree.txt | 3 +- .../jvmRecord/diagnostics.antlrtree.txt | 3 +- .../simpleRecords.main.antlrtree.txt | 399 ++- .../typeParameters/kt46186.antlrtree.txt | 3 +- ...TypeParametersFromOuterClass.antlrtree.txt | 3 +- .../exposedExpandedType.antlrtree.txt | 3 +- .../importFromTypeAliasObject.2.antlrtree.txt | 4 +- .../typealias/inSupertypesList.antlrtree.txt | 3 +- .../typealias/kt19601.antlrtree.txt | 3 +- .../typealias/nested.antlrtree.txt | 3 +- .../typealias/recursive.antlrtree.txt | 3 +- ...AliasConstructorForInterface.antlrtree.txt | 3 +- ...rsionOfSignedToUnsigned.test.antlrtree.txt | 13 +- .../lateinitUnsignedType.antlrtree.txt | 3 +- .../basicValueClassDeclaration.antlrtree.txt | 3 +- ...alueClassDeclarationDisabled.antlrtree.txt | 3 +- ...nstructorsJvmSignaturesClash.antlrtree.txt | 3 +- ...elegatedPropertyInValueClass.antlrtree.txt | 3 +- .../functionsJvmSignaturesClash.antlrtree.txt | 3 +- ...naturesConflictOnInheritance.antlrtree.txt | 3 +- ...tyComparisonWithValueClasses.antlrtree.txt | 3 +- .../jvmInlineApplicability.antlrtree.txt | 3 +- ...ializerBlockInsideValueClass.antlrtree.txt | 3 +- ...maryConstructorForValueClass.antlrtree.txt | 3 +- ...ackingFieldsInsideValueClass.antlrtree.txt | 3 +- ...ursiveMultiFieldValueClasses.antlrtree.txt | 279 ++- .../recursiveValueClasses.antlrtree.txt | 3 +- ...lsWithoutArtifactOnClasspath.antlrtree.txt | 3 +- ...ssCanOnlyImplementInterfaces.antlrtree.txt | 3 +- ...plementInterfaceByDelegation.antlrtree.txt | 3 +- ...torParameterWithDefaultValue.antlrtree.txt | 3 +- .../valueClassDeclarationCheck.antlrtree.txt | 3 +- ...alueClassesInsideAnnotations.antlrtree.txt | 3 +- ...OnParametersOfValueClassType.antlrtree.txt | 3 +- 205 files changed, 5619 insertions(+), 410 deletions(-) rename grammar/testData/diagnostics/multiplatform/hmpp/{ => multiplatformCompositeAnalysis}/sealedInheritorsInComplexModuleStructure.diff (100%) diff --git a/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.antlrtree.txt b/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.antlrtree.txt index 9fa878cc4..a5dca1031 100644 --- a/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.antlrtree.txt +++ b/grammar/testData/diagnostics/FreeFunctionCalledAsExtension.antlrtree.txt @@ -1,4 +1,4 @@ -File: FreeFunctionCalledAsExtension.kt - 59cd97a7b254bcf72776977e8500487e +File: FreeFunctionCalledAsExtension.kt - b22c92c2d9fbd292bc12c2de13f10269 packageHeader importList topLevelObject @@ -111,6 +111,21 @@ File: FreeFunctionCalledAsExtension.kt - 59cd97a7b254bcf72776977e8500487e RCURL("}") semis NL("\n") + topLevelObject + declaration + typeAlias + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("AliasedEFT") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ExtensionFunctionType") + semis + NL("\n") NL("\n") topLevelObject declaration @@ -135,7 +150,7 @@ File: FreeFunctionCalledAsExtension.kt - 59cd97a7b254bcf72776977e8500487e userType simpleUserType simpleIdentifier - Identifier("ExtensionFunctionType") + Identifier("AliasedEFT") typeReference userType simpleUserType diff --git a/grammar/testData/diagnostics/FunctionCalleeExpressions.antlrtree.txt b/grammar/testData/diagnostics/FunctionCalleeExpressions.antlrtree.txt index edb9f64a0..a7c94b688 100644 --- a/grammar/testData/diagnostics/FunctionCalleeExpressions.antlrtree.txt +++ b/grammar/testData/diagnostics/FunctionCalleeExpressions.antlrtree.txt @@ -1,5 +1,4 @@ -File: FunctionCalleeExpressions.kt - 919f872f45ffc5fa848799fbda59438a (WITH_ERRORS) - NL("\n") +File: FunctionCalleeExpressions.kt - d61ea8cba7585448c1096b67ca93fa8d (WITH_ERRORS) NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/IncDec.antlrtree.txt b/grammar/testData/diagnostics/IncDec.antlrtree.txt index fb31ed837..76472448b 100644 --- a/grammar/testData/diagnostics/IncDec.antlrtree.txt +++ b/grammar/testData/diagnostics/IncDec.antlrtree.txt @@ -1,4 +1,5 @@ -File: IncDec.kt - dcbdf82a8bf7f6eedb83fac025c194c4 +File: IncDec.kt - fe1b27dcd36fbef2e75d8f916994b59f + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/OverridenSetterVisibility.antlrtree.txt b/grammar/testData/diagnostics/OverridenSetterVisibility.antlrtree.txt index f1a069350..28baad6ca 100644 --- a/grammar/testData/diagnostics/OverridenSetterVisibility.antlrtree.txt +++ b/grammar/testData/diagnostics/OverridenSetterVisibility.antlrtree.txt @@ -1,5 +1,4 @@ -File: OverridenSetterVisibility.kt - 2b884e516380a5727767ca3f905c53d7 - NL("\n") +File: OverridenSetterVisibility.kt - 12441df8a65d2fe172720cd2d27bc894 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/SafeCallNonNullReceiver.antlrtree.txt b/grammar/testData/diagnostics/SafeCallNonNullReceiver.antlrtree.txt index e5a14f3c5..0bc047bbd 100644 --- a/grammar/testData/diagnostics/SafeCallNonNullReceiver.antlrtree.txt +++ b/grammar/testData/diagnostics/SafeCallNonNullReceiver.antlrtree.txt @@ -1,5 +1,4 @@ -File: SafeCallNonNullReceiver.kt - 07ee7458295892d93eaeb988c67ebb76 - NL("\n") +File: SafeCallNonNullReceiver.kt - 098b8def152118de8eed33a40088e7c2 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/TraitWithConstructor.antlrtree.txt b/grammar/testData/diagnostics/TraitWithConstructor.antlrtree.txt index c99dcbdf1..f6def4b3f 100644 --- a/grammar/testData/diagnostics/TraitWithConstructor.antlrtree.txt +++ b/grammar/testData/diagnostics/TraitWithConstructor.antlrtree.txt @@ -1,4 +1,5 @@ -File: TraitWithConstructor.kt - c51148a44977a13d35953769ecdd1327 (WITH_ERRORS) +File: TraitWithConstructor.kt - 4a4019d6310d20c9622d148c57891712 (WITH_ERRORS) + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/annotations/ConstructorCall.antlrtree.txt b/grammar/testData/diagnostics/annotations/ConstructorCall.antlrtree.txt index a44ef0cb4..6d0e1e1c1 100644 --- a/grammar/testData/diagnostics/annotations/ConstructorCall.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/ConstructorCall.antlrtree.txt @@ -1,4 +1,5 @@ -File: ConstructorCall.kt - 8b2460d7fd49bfcd5820bdebc2f81884 +File: ConstructorCall.kt - 951d1bb544d096a2b6a3f09f9e79f8a9 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/divide.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/divide.antlrtree.txt index 91652794d..108c8c19c 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/divide.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/divide.antlrtree.txt @@ -1,5 +1,4 @@ -File: divide.kt - 2fae9823d822eceb8b6d3eb86e661dd8 - NL("\n") +File: divide.kt - c098f365669a9759d5c56ea0005dd975 packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/intrincics.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/intrincics.antlrtree.txt index b4e853b3b..f3df18e6a 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/intrincics.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/intrincics.antlrtree.txt @@ -1,5 +1,4 @@ -File: intrincics.kt - 23a75d74013b8964d5f94e5a7a63e66f - NL("\n") +File: intrincics.kt - 5d0cb42444951b9b74dd5dc0c535fa76 packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/long.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/long.antlrtree.txt index f5ef7439c..60ce7604b 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/long.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/long.antlrtree.txt @@ -1,5 +1,4 @@ -File: long.kt - d2e94634d31fb68678aac033b5e11575 - NL("\n") +File: long.kt - aebd06e0d2e0f36b37241d2f2a0fd5ca packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueByte.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueByte.antlrtree.txt index ae730f25a..c7d34c46a 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueByte.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueByte.antlrtree.txt @@ -1,5 +1,4 @@ -File: maxValueByte.kt - fe3605cc9785bdd6ebdc8c2c9a601a43 - NL("\n") +File: maxValueByte.kt - 853eb189d2ab5d077dd9b734eeb9ba94 packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueInt.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueInt.antlrtree.txt index 39f726ebc..0ab4f8d0b 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueInt.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/maxValueInt.antlrtree.txt @@ -1,5 +1,4 @@ -File: maxValueInt.kt - fed6788bd028887098938720e4c1bbfb - NL("\n") +File: maxValueInt.kt - 89f439643e993ead3e51e0e279b0c8fa packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/miltiply.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/miltiply.antlrtree.txt index 90ce87f71..c075ff0de 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/miltiply.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/miltiply.antlrtree.txt @@ -1,5 +1,4 @@ -File: miltiply.kt - f77f6daea621ff58b9ead1f94572f810 - NL("\n") +File: miltiply.kt - ee0e04bd34d79e288a41be9c5a237987 packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/minus.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/minus.antlrtree.txt index 57b52bebf..841e5252b 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/minus.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/minus.antlrtree.txt @@ -1,5 +1,4 @@ -File: minus.kt - e93576e5f108394b725b09d36b1baeda - NL("\n") +File: minus.kt - fe1aa833945bde645fa15d4e7d946acf packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/mod.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/mod.antlrtree.txt index 766597acc..77f47ffbc 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/mod.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/mod.antlrtree.txt @@ -1,5 +1,4 @@ -File: mod.kt - c27ac8e53612dfb992255cb197b43122 - NL("\n") +File: mod.kt - 76fe753c35e16f2da9b56554df69f643 packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/plus.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/plus.antlrtree.txt index 2af7ddd68..55e4475c8 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/plus.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/plus.antlrtree.txt @@ -1,5 +1,4 @@ -File: plus.kt - ab1669a833e7bfffe53c548bd3c3e28f - NL("\n") +File: plus.kt - 2f993684e9c7f56d3f112ad64d8587d2 packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/stringTemplate.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/stringTemplate.antlrtree.txt index 1950df8c6..6a0616a1f 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/stringTemplate.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/stringTemplate.antlrtree.txt @@ -1,4 +1,5 @@ -File: stringTemplate.kt - 7253542f06aa02a3e5347d3127804b21 +File: stringTemplate.kt - fc0b08412418ac7ba3d39f2867dbac69 + NL("\n") packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/parameters/expressions/strings.antlrtree.txt b/grammar/testData/diagnostics/annotations/parameters/expressions/strings.antlrtree.txt index 076a0d79b..84ab2aa38 100644 --- a/grammar/testData/diagnostics/annotations/parameters/expressions/strings.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/parameters/expressions/strings.antlrtree.txt @@ -1,4 +1,5 @@ -File: strings.kt - 0f951f87bbf84d0182dc46633d75d696 +File: strings.kt - 5ad481d4c4b9c1129f7f795df938abec + NL("\n") packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/GetterAnnotations.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/GetterAnnotations.antlrtree.txt index cb9d9d643..5361b78eb 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/GetterAnnotations.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/GetterAnnotations.antlrtree.txt @@ -1,5 +1,4 @@ -File: GetterAnnotations.kt - 307bb5dbfe6bd5d578a5d2525e3ad402 - NL("\n") +File: GetterAnnotations.kt - 71ccd5145911016dbcef3b03b14a39bc packageHeader importList importHeader @@ -445,6 +444,60 @@ File: GetterAnnotations.kt - 307bb5dbfe6bd5d578a5d2525e3ad402 semis NL("\n") NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("useSiteTarget") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + getter + modifiers + annotation + singleAnnotation + annotationUseSiteTarget + AT_PRE_WS(" @") + GET("get") + COLON(":") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Ann") + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("5") + semis + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/PropertyAnnotations.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/PropertyAnnotations.antlrtree.txt index 5e9576556..3a0086664 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/PropertyAnnotations.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/PropertyAnnotations.antlrtree.txt @@ -1,5 +1,4 @@ -File: PropertyAnnotations.kt - ce9e45245f3b2cf546b5303326a91040 - NL("\n") +File: PropertyAnnotations.kt - ab13feb16307ef14d521d6dcee0cf60d packageHeader importList importHeader diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992.antlrtree.txt index 7a67832e9..36fbecd1b 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt23992.kt - 2aa0335248173391dcff9cf7ad9745e1 - NL("\n") +File: kt23992.kt - 46eb1bbf1e35d275f2d49adb4a66e809 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992_after.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992_after.antlrtree.txt index 290b841a7..869c1d59f 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992_after.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt23992_after.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt23992_after.kt - 5933a7e9203bf02141c7f65c51105045 - NL("\n") +File: kt23992_after.kt - 781726c59e750059ea01c91100c120d7 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt26638_after.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt26638_after.antlrtree.txt index 53c36c4a6..f2661333c 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt26638_after.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/kt26638_after.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt26638_after.kt - b93eb605075ae5184c25f85313d0818c - NL("\n") +File: kt26638_after.kt - 8b51ed46f4574fee5ac87ed40cd24566 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction_after.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction_after.antlrtree.txt index a259e2e30..e01d0d9ee 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction_after.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction_after.antlrtree.txt @@ -1,4 +1,5 @@ -File: receiverUseSiteTargetOnExtensionFunction_after.kt - 06236286d7edbc67e7afabd197fc303b +File: receiverUseSiteTargetOnExtensionFunction_after.kt - d14e51f0ccf40b3ccd8a3486a7dbdf7c + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.antlrtree.txt index 06b48daeb..718320a71 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.antlrtree.txt @@ -1,4 +1,5 @@ -File: wrongParamAnnotationsOnTypesError.kt - a7324cb80d9dabdcb0b2d0e00cd61c02 +File: wrongParamAnnotationsOnTypesError.kt - 867e65141bf29f99a403dcf52dca7a6f + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes_after.antlrtree.txt b/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes_after.antlrtree.txt index 4487057c4..46f03ac78 100644 --- a/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes_after.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes_after.antlrtree.txt @@ -1,4 +1,5 @@ -File: wrongParamAnnotationsOnTypes_after.kt - a7324cb80d9dabdcb0b2d0e00cd61c02 +File: wrongParamAnnotationsOnTypes_after.kt - 867e65141bf29f99a403dcf52dca7a6f + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/backingField/InitCustomSetter.antlrtree.txt b/grammar/testData/diagnostics/backingField/InitCustomSetter.antlrtree.txt index 045e15505..69a9e2e67 100644 --- a/grammar/testData/diagnostics/backingField/InitCustomSetter.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/InitCustomSetter.antlrtree.txt @@ -1,4 +1,5 @@ -File: InitCustomSetter.kt - c9bcc1960a99de14e99c5db4e48ea462 +File: InitCustomSetter.kt - a2fb0a7630ce64b53e46df8857095309 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/callableReference/bareType.antlrtree.txt b/grammar/testData/diagnostics/callableReference/bareType.antlrtree.txt index 13437f446..b34a35a7e 100644 --- a/grammar/testData/diagnostics/callableReference/bareType.antlrtree.txt +++ b/grammar/testData/diagnostics/callableReference/bareType.antlrtree.txt @@ -1,4 +1,5 @@ -File: bareType.kt - 1105e145ab8e739b575e00f16fdd54ba +File: bareType.kt - 6878093363f3258c36158965def3a173 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax3.antlrtree.txt b/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax3.antlrtree.txt index 0e5213ce4..354b34fe9 100644 --- a/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax3.antlrtree.txt +++ b/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax3.antlrtree.txt @@ -1,4 +1,4 @@ -File: reservedExpressionSyntax3.kt - 9b68a5323ef9e3a5a97bcb1de93eec6f +File: reservedExpressionSyntax3.kt - 69a7cecadc61f77f7de5aa3bf1e986f6 NL("\n") packageHeader PACKAGE("package") @@ -359,17 +359,6 @@ File: reservedExpressionSyntax3.kt - 9b68a5323ef9e3a5a97bcb1de93eec6f DOT(".") simpleIdentifier Identifier("b") - postfixUnarySuffix - typeArguments - LANGLE("<") - typeProjection - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RANGLE(">") postfixUnarySuffix navigationSuffix memberAccessOperator @@ -428,6 +417,17 @@ File: reservedExpressionSyntax3.kt - 9b68a5323ef9e3a5a97bcb1de93eec6f DOT(".") simpleIdentifier Identifier("b") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") postfixUnarySuffix navigationSuffix memberAccessOperator @@ -463,6 +463,65 @@ File: reservedExpressionSyntax3.kt - 9b68a5323ef9e3a5a97bcb1de93eec6f simpleIdentifier Identifier("Right") ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + callableReference + receiverType + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("a") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("b") + DOT(".") + simpleUserType + simpleIdentifier + Identifier("c") + quest + QUEST_NO_WS("?") + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("test2a") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Right") + ASSIGNMENT("=") expression disjunction conjunction diff --git a/grammar/testData/diagnostics/callableReference/kt37530.antlrtree.txt b/grammar/testData/diagnostics/callableReference/kt37530.antlrtree.txt index f8056b161..9d9425aa8 100644 --- a/grammar/testData/diagnostics/callableReference/kt37530.antlrtree.txt +++ b/grammar/testData/diagnostics/callableReference/kt37530.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt37530.kt - b434c9de348f47eabe8535708e312966 +File: kt37530.kt - fc3388c44d1b4eae9e8d86722d10c1ff + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/callableReference/property/backingField.antlrtree.txt b/grammar/testData/diagnostics/callableReference/property/backingField.antlrtree.txt index 366cd5b87..d3f00923c 100644 --- a/grammar/testData/diagnostics/callableReference/property/backingField.antlrtree.txt +++ b/grammar/testData/diagnostics/callableReference/property/backingField.antlrtree.txt @@ -1,5 +1,4 @@ -File: backingField.kt - 46b950f04ca4e00fde95f5d174b6ad93 - NL("\n") +File: backingField.kt - 5ffd3b447c242b3fe4ff51d6478645ca NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/callableReference/property/kt7945_unrelatedClass.antlrtree.txt b/grammar/testData/diagnostics/callableReference/property/kt7945_unrelatedClass.antlrtree.txt index 17122ca02..c3b8afaaf 100644 --- a/grammar/testData/diagnostics/callableReference/property/kt7945_unrelatedClass.antlrtree.txt +++ b/grammar/testData/diagnostics/callableReference/property/kt7945_unrelatedClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt7945_unrelatedClass.kt - 7b95295220bb8e8beae4e5a5367ad0df +File: kt7945_unrelatedClass.kt - 369245ce3f2b91137eea9d72c002565c + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/cast/bare/NullableAsNotEnough.antlrtree.txt b/grammar/testData/diagnostics/cast/bare/NullableAsNotEnough.antlrtree.txt index e69ab51d0..1cc90999e 100644 --- a/grammar/testData/diagnostics/cast/bare/NullableAsNotEnough.antlrtree.txt +++ b/grammar/testData/diagnostics/cast/bare/NullableAsNotEnough.antlrtree.txt @@ -1,4 +1,5 @@ -File: NullableAsNotEnough.kt - 5982446b0d15ad6257d8d73a2b4a91cf +File: NullableAsNotEnough.kt - 790031c539f866f906d66591473efa30 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/cast/bare/UnrelatedAs.antlrtree.txt b/grammar/testData/diagnostics/cast/bare/UnrelatedAs.antlrtree.txt index 0f512fc12..67318f17a 100644 --- a/grammar/testData/diagnostics/cast/bare/UnrelatedAs.antlrtree.txt +++ b/grammar/testData/diagnostics/cast/bare/UnrelatedAs.antlrtree.txt @@ -1,4 +1,5 @@ -File: UnrelatedAs.kt - 5c50d35ac7c1cc94ac401b377588a59f +File: UnrelatedAs.kt - 04a5f92517754bfa804248f93d37a27d + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/checkArguments/kt49276.antlrtree.txt b/grammar/testData/diagnostics/checkArguments/kt49276.antlrtree.txt index fc8aa16ab..935ebd368 100644 --- a/grammar/testData/diagnostics/checkArguments/kt49276.antlrtree.txt +++ b/grammar/testData/diagnostics/checkArguments/kt49276.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt49276.kt - ebf23216a3efc3f95f21b89fae9b0be2 +File: kt49276.kt - 0d1f93bb992bf182f678fd311c4ac51d + NL("\n") + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/checkArguments/kt49276Error.antlrtree.txt b/grammar/testData/diagnostics/checkArguments/kt49276Error.antlrtree.txt index 00819f06a..37717882a 100644 --- a/grammar/testData/diagnostics/checkArguments/kt49276Error.antlrtree.txt +++ b/grammar/testData/diagnostics/checkArguments/kt49276Error.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt49276Error.kt - 556d17fc3df92abe6f3d6e1b9b8ea5f4 +File: kt49276Error.kt - 433758109837f0d9b84f4601eb9f0ea0 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/checkArguments/twoLambdasFunction.antlrtree.txt b/grammar/testData/diagnostics/checkArguments/twoLambdasFunction.antlrtree.txt index 34193c8c4..4dafe2b23 100644 --- a/grammar/testData/diagnostics/checkArguments/twoLambdasFunction.antlrtree.txt +++ b/grammar/testData/diagnostics/checkArguments/twoLambdasFunction.antlrtree.txt @@ -1,4 +1,5 @@ -File: twoLambdasFunction.kt - 574cdbeb65d7648f3e152c477c322c86 +File: twoLambdasFunction.kt - 69dd85e19fa7b9c5372c44daa103a657 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/classLiteral/nonClassesOnLHS.antlrtree.txt b/grammar/testData/diagnostics/classLiteral/nonClassesOnLHS.antlrtree.txt index 66e3619ee..59d35af4f 100644 --- a/grammar/testData/diagnostics/classLiteral/nonClassesOnLHS.antlrtree.txt +++ b/grammar/testData/diagnostics/classLiteral/nonClassesOnLHS.antlrtree.txt @@ -1,4 +1,5 @@ -File: nonClassesOnLHS.kt - 0b5a0af5afd50b643506a3dd1e422474 +File: nonClassesOnLHS.kt - a4642e510ae3db801f6e6242df3d5840 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/classLiteral/unresolvedClass.antlrtree.txt b/grammar/testData/diagnostics/classLiteral/unresolvedClass.antlrtree.txt index f1dd0571d..2a1d318c0 100644 --- a/grammar/testData/diagnostics/classLiteral/unresolvedClass.antlrtree.txt +++ b/grammar/testData/diagnostics/classLiteral/unresolvedClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: unresolvedClass.kt - d76dadeb993cab93abe721513bbd2174 +File: unresolvedClass.kt - 5aab70476ef845683ba59fbcfc7167ea + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/collectionLiterals/collectionLiteralsOutsideOfAnnotations.antlrtree.txt b/grammar/testData/diagnostics/collectionLiterals/collectionLiteralsOutsideOfAnnotations.antlrtree.txt index d40f448f0..f38198d45 100644 --- a/grammar/testData/diagnostics/collectionLiterals/collectionLiteralsOutsideOfAnnotations.antlrtree.txt +++ b/grammar/testData/diagnostics/collectionLiterals/collectionLiteralsOutsideOfAnnotations.antlrtree.txt @@ -1,5 +1,4 @@ -File: collectionLiteralsOutsideOfAnnotations.kt - 856744cca7097f2392facf7097c86a42 - NL("\n") +File: collectionLiteralsOutsideOfAnnotations.kt - b695b3ed03899518e9509d48dd33489a NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/collectionLiterals/defaultValuesInAnnotation.antlrtree.txt b/grammar/testData/diagnostics/collectionLiterals/defaultValuesInAnnotation.antlrtree.txt index 4e0487b92..060e9f0c7 100644 --- a/grammar/testData/diagnostics/collectionLiterals/defaultValuesInAnnotation.antlrtree.txt +++ b/grammar/testData/diagnostics/collectionLiterals/defaultValuesInAnnotation.antlrtree.txt @@ -1,6 +1,20 @@ -File: defaultValuesInAnnotation.kt - 6f6e65f83b1a6eadf5dcfbd5fc3e44e6 (WITH_ERRORS) +File: defaultValuesInAnnotation.kt - 1262155effaffe88201cfeb74cd57a06 (WITH_ERRORS) packageHeader importList + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("kotlin") + DOT(".") + simpleIdentifier + Identifier("reflect") + DOT(".") + simpleIdentifier + Identifier("KClass") + semi + NL("\n") + NL("\n") topLevelObject declaration classDeclaration @@ -206,6 +220,114 @@ File: defaultValuesInAnnotation.kt - 6f6e65f83b1a6eadf5dcfbd5fc3e44e6 (WITH_ERRO LineStrText("2") QUOTE_CLOSE(""") RSQUARE("]") + COMMA(",") + classParameter + VAL("val") + simpleIdentifier + Identifier("d") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KClass") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Int") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + COMMA(",") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Array") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("class") + RSQUARE("]") + COMMA(",") RPAREN(")") semis NL("\n") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/UninitializedOrReassignedVariables.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/UninitializedOrReassignedVariables.antlrtree.txt index 0fa714ed7..b662442b5 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/UninitializedOrReassignedVariables.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/UninitializedOrReassignedVariables.antlrtree.txt @@ -1,4 +1,4 @@ -File: UninitializedOrReassignedVariables.kt - 7975ffb3a9c36b9518aadcdf6e002d3e +File: UninitializedOrReassignedVariables.kt - ed81870e5210098656b3de73a83e7b9e packageHeader PACKAGE("package") identifier @@ -1906,6 +1906,205 @@ File: UninitializedOrReassignedVariables.kt - 7975ffb3a9c36b9518aadcdf6e002d3e semis NL("\n") NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("t6") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("t5") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("t7") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + loopStatement + forStatement + FOR("for") + LPAREN("(") + variableDeclaration + simpleIdentifier + Identifier("i") + IN("in") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RANGE("..") + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("2") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("t5") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("i") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.antlrtree.txt index 9d1c1d575..14fe5837b 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.antlrtree.txt @@ -1,4 +1,5 @@ -File: deadCodeInLocalDeclarations.kt - ab3461974da987a82f7adb982c67e7c2 +File: deadCodeInLocalDeclarations.kt - f51650a6dab147d98a5ed80932f68cee + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/kt2960.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/kt2960.antlrtree.txt index cc4b0f297..40a66c13e 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/kt2960.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/kt2960.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt2960.kt - 35a177e1168ebc63489aa020675758d4 - NL("\n") +File: kt2960.kt - 8c7fb76e2e2f0b126d93bc0d169bcf2d NL("\n") NL("\n") packageHeader @@ -603,4 +602,6 @@ File: kt2960.kt - 35a177e1168ebc63489aa020675758d4 primaryExpression simpleIdentifier Identifier("i") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/uninitializedQualifiedEnumEntry.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/uninitializedQualifiedEnumEntry.antlrtree.txt index a6c6fc201..81c9eb6cb 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/uninitializedQualifiedEnumEntry.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/uninitializedQualifiedEnumEntry.antlrtree.txt @@ -1,4 +1,5 @@ -File: uninitializedQualifiedEnumEntry.kt - 02264c790426875f419b7bb6765188d8 +File: uninitializedQualifiedEnumEntry.kt - e4289fe09b02711f0a29c1c4cd3e5ee7 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/coroutines/callableReference/outsideSuspend.antlrtree.txt b/grammar/testData/diagnostics/coroutines/callableReference/outsideSuspend.antlrtree.txt index 595fb7bea..2f59821fd 100644 --- a/grammar/testData/diagnostics/coroutines/callableReference/outsideSuspend.antlrtree.txt +++ b/grammar/testData/diagnostics/coroutines/callableReference/outsideSuspend.antlrtree.txt @@ -1,5 +1,4 @@ -File: outsideSuspend.kt - 7cc3c6fb8c4dc9edf9abea4bb9d4e632 - NL("\n") +File: outsideSuspend.kt - 9d32dc1347d9d40a90cb8b08b0f6b66a NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.antlrtree.txt index 155bbc4bc..aa4a63386 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.antlrtree.txt @@ -1,4 +1,5 @@ -File: deprecatedSinceKotlinHiddenOnReferenceArgument.kt - 110e39a528fd0e9b2568ae3712a4b74d +File: deprecatedSinceKotlinHiddenOnReferenceArgument.kt - 6a4ee4f0309297022d2bd67cf4ffe864 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinWithoutArguments.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinWithoutArguments.antlrtree.txt index 9c4be3e7c..93a5d5036 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinWithoutArguments.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinWithoutArguments.antlrtree.txt @@ -1,4 +1,5 @@ -File: deprecatedSinceKotlinWithoutArguments.kt - 0eda659dc93fac79807f8bf0f4d33f9d +File: deprecatedSinceKotlinWithoutArguments.kt - 01a8bdad836f1f4c5fb167048a5f46ec + NL("\n") packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/hidden.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/hidden.antlrtree.txt index 03c26abcf..c8d24c67b 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/hidden.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/hidden.antlrtree.txt @@ -1,4 +1,5 @@ -File: hidden.kt - 29dbc5130fa735a601b3cb5e53c8faf4 +File: hidden.kt - 656260816d1d50b30230dfae4056c3a5 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/warning.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/warning.antlrtree.txt index d6fb57c5a..fe2e4e313 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/warning.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/warning.antlrtree.txt @@ -1,4 +1,5 @@ -File: warning.kt - 98ea224606ab331fd1070735fb566f6f +File: warning.kt - a5066d50cc36cada92261929025e42e8 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/deprecated/genericConstructorUsage.antlrtree.txt b/grammar/testData/diagnostics/deprecated/genericConstructorUsage.antlrtree.txt index 5072d3ba7..a3434996e 100644 --- a/grammar/testData/diagnostics/deprecated/genericConstructorUsage.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/genericConstructorUsage.antlrtree.txt @@ -1,4 +1,5 @@ -File: genericConstructorUsage.kt - 7143ddbf7d0d9120141cf69e00094f16 +File: genericConstructorUsage.kt - e0ef8618f6b042a35bc26a10238f2efc + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/deprecated/typealiasConstructor.antlrtree.txt b/grammar/testData/diagnostics/deprecated/typealiasConstructor.antlrtree.txt index a7658cce3..80d429b60 100644 --- a/grammar/testData/diagnostics/deprecated/typealiasConstructor.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/typealiasConstructor.antlrtree.txt @@ -1,4 +1,4 @@ -File: typealiasConstructor.kt - cff54a735b116bf135eac101fba42d71 +File: typealiasConstructor.kt - 017a743e8e615a1b8805098ac2112596 packageHeader importList topLevelObject @@ -281,4 +281,5 @@ File: typealiasConstructor.kt - cff54a735b116bf135eac101fba42d71 valueArguments LPAREN("(") RPAREN(")") + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/deprecated/typealiasForDeprecatedClass.antlrtree.txt b/grammar/testData/diagnostics/deprecated/typealiasForDeprecatedClass.antlrtree.txt index a1581940c..99fb05c26 100644 --- a/grammar/testData/diagnostics/deprecated/typealiasForDeprecatedClass.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/typealiasForDeprecatedClass.antlrtree.txt @@ -1,4 +1,4 @@ -File: typealiasForDeprecatedClass.kt - 8148ce862cda3e1481ac1eefe279fb9d +File: typealiasForDeprecatedClass.kt - 8a9d03a274d79c2a839604df8eda8a86 packageHeader importList topLevelObject @@ -7,7 +7,7 @@ File: typealiasForDeprecatedClass.kt - 8148ce862cda3e1481ac1eefe279fb9d modifiers annotation singleAnnotation - AT_NO_WS("@") + AT_PRE_WS("\n@") unescapedAnnotation constructorInvocation userType diff --git a/grammar/testData/diagnostics/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.antlrtree.txt b/grammar/testData/diagnostics/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.antlrtree.txt index b5ab76e34..c1330bb3d 100644 --- a/grammar/testData/diagnostics/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.antlrtree.txt +++ b/grammar/testData/diagnostics/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.antlrtree.txt @@ -1,4 +1,5 @@ -File: enumMembers.kt - 920a215ba99082cce8a26974fae57d54 +File: enumMembers.kt - 23cc69629c8ca38c95654315c7c059bc + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/enum/incompatibleEnumEntryClasses.antlrtree.txt b/grammar/testData/diagnostics/enum/incompatibleEnumEntryClasses.antlrtree.txt index e09c8ba41..cdd1beac4 100644 --- a/grammar/testData/diagnostics/enum/incompatibleEnumEntryClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/enum/incompatibleEnumEntryClasses.antlrtree.txt @@ -1,4 +1,5 @@ -File: incompatibleEnumEntryClasses.kt - 97650b50356cb6ee135843fe421d5908 +File: incompatibleEnumEntryClasses.kt - 3b452cacdd233744889e338d3ce5c07c + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/evaluate/binaryMinusDepOnExpType.antlrtree.txt b/grammar/testData/diagnostics/evaluate/binaryMinusDepOnExpType.antlrtree.txt index c69a93389..73c21a0e5 100644 --- a/grammar/testData/diagnostics/evaluate/binaryMinusDepOnExpType.antlrtree.txt +++ b/grammar/testData/diagnostics/evaluate/binaryMinusDepOnExpType.antlrtree.txt @@ -1,5 +1,4 @@ -File: binaryMinusDepOnExpType.kt - c4ea7d87f0615dd8fb6a27410447008d - NL("\n") +File: binaryMinusDepOnExpType.kt - 5a306d6d00df533ad7fc5493c82d1659 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/evaluate/numberBinaryOperations.antlrtree.txt b/grammar/testData/diagnostics/evaluate/numberBinaryOperations.antlrtree.txt index 5467c2237..cb0b8d0b7 100644 --- a/grammar/testData/diagnostics/evaluate/numberBinaryOperations.antlrtree.txt +++ b/grammar/testData/diagnostics/evaluate/numberBinaryOperations.antlrtree.txt @@ -1,5 +1,4 @@ -File: numberBinaryOperations.kt - 392f4210939ca193a1752a5cb63866dc - NL("\n") +File: numberBinaryOperations.kt - 35e1a44f9c09a84e96b94d08f5060bd5 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/evaluate/numberBinaryOperationsCall.antlrtree.txt b/grammar/testData/diagnostics/evaluate/numberBinaryOperationsCall.antlrtree.txt index 27fa66383..fbec877a2 100644 --- a/grammar/testData/diagnostics/evaluate/numberBinaryOperationsCall.antlrtree.txt +++ b/grammar/testData/diagnostics/evaluate/numberBinaryOperationsCall.antlrtree.txt @@ -1,5 +1,4 @@ -File: numberBinaryOperationsCall.kt - 32a9d486e5a8422f38f64dd3e4374176 - NL("\n") +File: numberBinaryOperationsCall.kt - 528831974a60c2acb48acdef3748ca1c packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/evaluate/numberBinaryOperationsInfixCall.antlrtree.txt b/grammar/testData/diagnostics/evaluate/numberBinaryOperationsInfixCall.antlrtree.txt index 6694ef488..4d6b50a27 100644 --- a/grammar/testData/diagnostics/evaluate/numberBinaryOperationsInfixCall.antlrtree.txt +++ b/grammar/testData/diagnostics/evaluate/numberBinaryOperationsInfixCall.antlrtree.txt @@ -1,5 +1,4 @@ -File: numberBinaryOperationsInfixCall.kt - ef6221ffef78ec1f3d38d47f3426a23f - NL("\n") +File: numberBinaryOperationsInfixCall.kt - aa0075489ffd771f2bda908c797e2ff3 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/evaluate/parentesized.antlrtree.txt b/grammar/testData/diagnostics/evaluate/parentesized.antlrtree.txt index ce415c28f..58a727c99 100644 --- a/grammar/testData/diagnostics/evaluate/parentesized.antlrtree.txt +++ b/grammar/testData/diagnostics/evaluate/parentesized.antlrtree.txt @@ -1,5 +1,4 @@ -File: parentesized.kt - 304aa0d0fd2fb469a01b9f39a9890867 - NL("\n") +File: parentesized.kt - 30fd27632079782bbd0747fcdb08c1ab packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/approximation.antlrtree.txt b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/approximation.antlrtree.txt index d5845af89..f1a82088e 100644 --- a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/approximation.antlrtree.txt +++ b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/approximation.antlrtree.txt @@ -1,4 +1,5 @@ -File: approximation.kt - 0c65ee5f9ed13de8bfc998f4d512ffcb +File: approximation.kt - 9da100b4e645a5dbcebc59856f818d6e + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/recursiveBounds.antlrtree.txt b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/recursiveBounds.antlrtree.txt index 5ae34c577..819c7a02e 100644 --- a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/recursiveBounds.antlrtree.txt +++ b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/recursiveBounds.antlrtree.txt @@ -1,4 +1,4 @@ -File: recursiveBounds.kt - 355cabe2e8fac4bac997827450b3f6a0 +File: recursiveBounds.kt - 5930fd9a383967f0b46e1832f46b1d45 NL("\n") NL("\n") packageHeader @@ -233,7 +233,51 @@ File: recursiveBounds.kt - 355cabe2e8fac4bac997827450b3f6a0 Identifier("Any") RANGLE(">") simpleIdentifier - Identifier("baz") + Identifier("baz1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("E") + COLON(":") + type + definitelyNonNullableType + userType + simpleUserType + simpleIdentifier + Identifier("E") + AMP("&") + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + receiverType + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("E") + quest + QUEST_NO_WS("?") + DOT(".") + simpleIdentifier + Identifier("baz2") functionValueParameters LPAREN("(") RPAREN(")") diff --git a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/reifiedArguments.antlrtree.txt b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/reifiedArguments.antlrtree.txt index cc546a117..eba9e71ac 100644 --- a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/reifiedArguments.antlrtree.txt +++ b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/reifiedArguments.antlrtree.txt @@ -1,4 +1,5 @@ -File: reifiedArguments.kt - 36d9e6bd4fadb8e4f1378a4340d4e41a +File: reifiedArguments.kt - 996d89eaad39eab15979c2faab899262 + NL("\n") NL("\n") NL("\n") NL("\n") @@ -115,4 +116,214 @@ File: reifiedArguments.kt - 36d9e6bd4fadb8e4f1378a4340d4e41a RCURL("}") semis NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("KAnnotatedElement") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("annotations") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Iterable") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("firstIsInstanceOrNull") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_WS("? ") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + jumpExpression + RETURN("return") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + modifier + functionModifier + INLINE("inline") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + typeParameterModifiers + typeParameterModifier + reificationModifier + REIFIED("reified") + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("KAnnotatedElement") + DOT(".") + simpleIdentifier + Identifier("findAnnotation") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + quest + QUEST_WS("? ") + functionBody + ASSIGNMENT("=") + NL("\n") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("annotations") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("firstIsInstanceOrNull") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") EOF("") diff --git a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/simple.antlrtree.txt b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/simple.antlrtree.txt index 85f0b7eda..6841b1769 100644 --- a/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/simple.antlrtree.txt +++ b/grammar/testData/diagnostics/explicitDefinitelyNotNullableViaIntersection/simple.antlrtree.txt @@ -1,4 +1,5 @@ -File: simple.kt - 4482a6f3cdd69af1a4bacf61667391e2 +File: simple.kt - c5919f98ec3612695bf1dad76ba0589c + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/exposed/protectedInProtected.antlrtree.txt b/grammar/testData/diagnostics/exposed/protectedInProtected.antlrtree.txt index ad891dcfb..1217f45b2 100644 --- a/grammar/testData/diagnostics/exposed/protectedInProtected.antlrtree.txt +++ b/grammar/testData/diagnostics/exposed/protectedInProtected.antlrtree.txt @@ -1,4 +1,4 @@ -File: protectedInProtected.kt - d7920dcf747ff0f9e5877b77ee4ff922 +File: protectedInProtected.kt - 63efbb55b722058623864d584d3528a9 NL("\n") NL("\n") NL("\n") @@ -103,4 +103,126 @@ File: protectedInProtected.kt - d7920dcf747ff0f9e5877b77ee4ff922 semis NL("\n") NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("Owner") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("A") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Owner") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("ProtectedInA") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("B") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("A") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PROTECTED("protected") + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("ProtectedInA") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/fromKEEP/functionalType.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/fromKEEP/functionalType.antlrtree.txt index 876c2b1bd..3c24d3f48 100644 --- a/grammar/testData/diagnostics/extensions/contextReceivers/fromKEEP/functionalType.antlrtree.txt +++ b/grammar/testData/diagnostics/extensions/contextReceivers/fromKEEP/functionalType.antlrtree.txt @@ -1,4 +1,5 @@ -File: functionalType.kt - 829d89f6624189f39795e2f76c3e0adf (WITH_ERRORS) +File: functionalType.kt - b76e031d635f1e1a30b7b67f839b19e6 (WITH_ERRORS) + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/extensions/extensionMemberInClassObject.antlrtree.txt b/grammar/testData/diagnostics/extensions/extensionMemberInClassObject.antlrtree.txt index e57f0bafc..0f854bb5f 100644 --- a/grammar/testData/diagnostics/extensions/extensionMemberInClassObject.antlrtree.txt +++ b/grammar/testData/diagnostics/extensions/extensionMemberInClassObject.antlrtree.txt @@ -1,4 +1,5 @@ -File: extensionMemberInClassObject.kt - e6f9c0bf53efdfe6e8d892c9910d321e +File: extensionMemberInClassObject.kt - 5b7eae34a7e2adc3be1898c88ee7e3a7 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/funInterface/funInterfaceDeclarationCheck.antlrtree.txt b/grammar/testData/diagnostics/funInterface/funInterfaceDeclarationCheck.antlrtree.txt index 59f3f7eb3..8906843fc 100644 --- a/grammar/testData/diagnostics/funInterface/funInterfaceDeclarationCheck.antlrtree.txt +++ b/grammar/testData/diagnostics/funInterface/funInterfaceDeclarationCheck.antlrtree.txt @@ -1,4 +1,5 @@ -File: funInterfaceDeclarationCheck.kt - d2be1d846f7bcf3a4f27eb3abc50fef7 +File: funInterfaceDeclarationCheck.kt - c96a633e7c2a2120e6beaa480a1e7739 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/functionLiterals/kt47493.antlrtree.txt b/grammar/testData/diagnostics/functionLiterals/kt47493.antlrtree.txt index 29a8f7766..f2304f4e6 100644 --- a/grammar/testData/diagnostics/functionLiterals/kt47493.antlrtree.txt +++ b/grammar/testData/diagnostics/functionLiterals/kt47493.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt47493.kt - 28d66f5a78070c5a4e22bd44836f7dae +File: kt47493.kt - 753af52b8c152d964fa09c8f90a77adf + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/generics/projectionsScope/unsafeVarianceInAliasedFunctionalType.antlrtree.txt b/grammar/testData/diagnostics/generics/projectionsScope/unsafeVarianceInAliasedFunctionalType.antlrtree.txt index 76481f211..c1c2b2f4f 100644 --- a/grammar/testData/diagnostics/generics/projectionsScope/unsafeVarianceInAliasedFunctionalType.antlrtree.txt +++ b/grammar/testData/diagnostics/generics/projectionsScope/unsafeVarianceInAliasedFunctionalType.antlrtree.txt @@ -1,4 +1,5 @@ -File: unsafeVarianceInAliasedFunctionalType.kt - 6cee3389ba807b09fec52ebfca92e11d +File: unsafeVarianceInAliasedFunctionalType.kt - ee392582e4533e9453912b44a00c5964 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutNoPlusAssign.antlrtree.txt b/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutNoPlusAssign.antlrtree.txt index 6822e6d97..c3a86dc7e 100644 --- a/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutNoPlusAssign.antlrtree.txt +++ b/grammar/testData/diagnostics/generics/varProjection/setterProjectedOutNoPlusAssign.antlrtree.txt @@ -1,5 +1,4 @@ -File: setterProjectedOutNoPlusAssign.kt - b31632e2ebbc7a262edcdec99f5414ec - NL("\n") +File: setterProjectedOutNoPlusAssign.kt - fc4d392794cdee0c344352b40873d1a3 NL("\n") packageHeader importList @@ -121,4 +120,6 @@ File: setterProjectedOutNoPlusAssign.kt - b31632e2ebbc7a262edcdec99f5414ec semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/imports/CheckJavaVisibility.k2.antlrtree.txt b/grammar/testData/diagnostics/imports/CheckJavaVisibility.k2.antlrtree.txt index 32fc793f8..fb9fff140 100644 --- a/grammar/testData/diagnostics/imports/CheckJavaVisibility.k2.antlrtree.txt +++ b/grammar/testData/diagnostics/imports/CheckJavaVisibility.k2.antlrtree.txt @@ -1,4 +1,4 @@ -File: CheckJavaVisibility.k2.kt - 657d6a1942b062664884f4055db20a9f +File: CheckJavaVisibility.k2.kt - 7b4208301a7fbf73d576d34246aeb766 packageHeader PACKAGE("package") identifier @@ -166,4 +166,6 @@ File: CheckJavaVisibility.k2.kt - 657d6a1942b062664884f4055db20a9f DOT(".") simpleIdentifier Identifier("javaPPrivate") + semi + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentName.antlrtree.txt b/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentName.antlrtree.txt index 7d95f46c4..9e9ae21e3 100644 --- a/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentName.antlrtree.txt +++ b/grammar/testData/diagnostics/imports/ImportFromCurrentWithDifferentName.antlrtree.txt @@ -1,4 +1,5 @@ -File: ImportFromCurrentWithDifferentName.kt - d7544a26a604fcc1a0569a0115dc529a +File: ImportFromCurrentWithDifferentName.kt - 782d3791035e9277a5645bdc4a82e1dd + NL("\n") packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/imports/OptionalAnnotationClasses.antlrtree.txt b/grammar/testData/diagnostics/imports/OptionalAnnotationClasses.antlrtree.txt index 99f558e02..e93995994 100644 --- a/grammar/testData/diagnostics/imports/OptionalAnnotationClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/imports/OptionalAnnotationClasses.antlrtree.txt @@ -1,4 +1,4 @@ -File: OptionalAnnotationClasses.kt - df566f7245e0ca84e377a2062748831b +File: OptionalAnnotationClasses.kt - 3b57a0bb0e1aa85b6868e9dd294823ae NL("\n") NL("\n") fileAnnotation @@ -133,7 +133,7 @@ File: OptionalAnnotationClasses.kt - df566f7245e0ca84e377a2062748831b userType simpleUserType simpleIdentifier - Identifier("SharedImmutable") + Identifier("ThreadLocal") NL("\n") modifier visibilityModifier diff --git a/grammar/testData/diagnostics/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.antlrtree.txt b/grammar/testData/diagnostics/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.antlrtree.txt index 6fed6c8d0..444e6f242 100644 --- a/grammar/testData/diagnostics/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.antlrtree.txt +++ b/grammar/testData/diagnostics/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.antlrtree.txt @@ -1,4 +1,5 @@ -File: checkBackingFieldException.kt - 4a8c89056bcbc7c6e3cdc1c9a0e5c170 (WITH_ERRORS) +File: checkBackingFieldException.kt - 80822ebe1da38d93ec9ca9b6513bf6a9 (WITH_ERRORS) + NL("\n") NL("\n") packageHeader PACKAGE("package") @@ -81,7 +82,6 @@ File: checkBackingFieldException.kt - 4a8c89056bcbc7c6e3cdc1c9a0e5c170 (WITH_ERR LCURL("{") semis NL("\n") - NL("\n") FieldIdentifier("$area") ASSIGNMENT("=") Identifier("size") diff --git a/grammar/testData/diagnostics/inference/builderInference/kt47986_2.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/kt47986_2.antlrtree.txt index 0302c03b3..694c958bd 100644 --- a/grammar/testData/diagnostics/inference/builderInference/kt47986_2.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/kt47986_2.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt47986_2.kt - e1dc1cc63d6970c79ee17c8aeea0aee4 +File: kt47986_2.kt - e8a34928116b0b67bde7c3a935eebe84 NL("\n") packageHeader importList @@ -303,4 +303,6 @@ File: kt47986_2.kt - e1dc1cc63d6970c79ee17c8aeea0aee4 RCURL("}") NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestrictionDisabled.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestrictionDisabled.antlrtree.txt index fe9e671f3..bf9785e17 100644 --- a/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestrictionDisabled.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestrictionDisabled.antlrtree.txt @@ -1,5 +1,4 @@ -File: multiLambdaRestrictionDisabled.kt - 8d0c03a0588a437e2b4298179ef4fa1b - NL("\n") +File: multiLambdaRestrictionDisabled.kt - dbfdf25178fe5059bc06e2abd4fbdddd NL("\n") NL("\n") NL("\n") @@ -1853,4 +1852,6 @@ File: multiLambdaRestrictionDisabled.kt - 8d0c03a0588a437e2b4298179ef4fa1b semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithExpectedTypeAndBound.antlrtree.txt b/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithExpectedTypeAndBound.antlrtree.txt index fe0fa8ce2..01b3061f8 100644 --- a/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithExpectedTypeAndBound.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithExpectedTypeAndBound.antlrtree.txt @@ -1,4 +1,5 @@ -File: coercionWithExpectedTypeAndBound.kt - f2ee7208bdf5d6c525fe034e161bd996 +File: coercionWithExpectedTypeAndBound.kt - 30c320d5609e4767cb157ca6ae6af632 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithoutExpectedType.antlrtree.txt b/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithoutExpectedType.antlrtree.txt index b09de8841..ab6723f9e 100644 --- a/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithoutExpectedType.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/coercionToUnit/coercionWithoutExpectedType.antlrtree.txt @@ -1,4 +1,5 @@ -File: coercionWithoutExpectedType.kt - c6a756aea3dcb0188bee694847394dd2 +File: coercionWithoutExpectedType.kt - 72260cbcb7431b89e0a6cc2fe565b5b6 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/coercionToUnit/indirectCoercionWithExpectedType.antlrtree.txt b/grammar/testData/diagnostics/inference/coercionToUnit/indirectCoercionWithExpectedType.antlrtree.txt index 17b0831a5..13f27024a 100644 --- a/grammar/testData/diagnostics/inference/coercionToUnit/indirectCoercionWithExpectedType.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/coercionToUnit/indirectCoercionWithExpectedType.antlrtree.txt @@ -1,4 +1,5 @@ -File: indirectCoercionWithExpectedType.kt - 0cbca07619560e38eb5329a83e8a6e32 +File: indirectCoercionWithExpectedType.kt - c9dd2889e38c8539503099976fc3494a + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.antlrtree.txt b/grammar/testData/diagnostics/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.antlrtree.txt index f2a3afa05..ba8330cc5 100644 --- a/grammar/testData/diagnostics/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.antlrtree.txt @@ -1,4 +1,5 @@ -File: notInferableParameterOfAnonymousFunction.kt - bbe346e7ef0931a1301ccb919c58a06a +File: notInferableParameterOfAnonymousFunction.kt - 14860e75cb80d9abdc3d1ac478434218 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_10.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_10.antlrtree.txt index 4fae9cf33..b0ea18683 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_10.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_10.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt45461_10.kt - 9c17d71e513f3a8c09fba9df586974ca - NL("\n") +File: kt45461_10.kt - 8bb6eda5f4d8138ec33d466dc88a55d9 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_12.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_12.antlrtree.txt index 40a63755d..9c98f7ab1 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_12.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_12.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt45461_12.kt - d3a15721753a49748d6fd3cae965774e +File: kt45461_12.kt - 8b1d1d7bc1932a6ba3a8ad3b7cae7059 + NL("\n") + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_13.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_13.antlrtree.txt index 6c97608f7..cd07762f0 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_13.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_13.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt45461_13.kt - d983461f4c43cf925848144f9ecaa861 - NL("\n") +File: kt45461_13.kt - 3056b75e040bbd5cea836753cb0b0917 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_2.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_2.antlrtree.txt index c6cf473f6..6e1e02ddf 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_2.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_2.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt45461_2.kt - 2f3e5345027414cd9f4f99141c9a10cb +File: kt45461_2.kt - e139067128c8c8fbe3ef56e7bbd19e84 + NL("\n") + NL("\n") NL("\n") packageHeader importList @@ -230,4 +232,6 @@ File: kt45461_2.kt - 2f3e5345027414cd9f4f99141c9a10cb semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_21.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_21.antlrtree.txt index 9e4aa94bc..c6d5fbcec 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_21.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_21.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt45461_21.kt - 25e4d39efb2ff0198e2028b45e92be39 +File: kt45461_21.kt - 789ebc4307024c1e44f32280885c773a NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_24.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_24.antlrtree.txt index f3fd9e1fd..e2f6379f7 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_24.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_24.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt45461_24.kt - 58db8da683cfc279d426cdbc69f1f1da +File: kt45461_24.kt - 9b0a92c9a7e6dff8c4a846cd15393215 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_28.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_28.antlrtree.txt index 9149b4665..59d359e4a 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_28.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_28.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_28.kt - 7b046897e569cf2f232bce10f09e287f +File: kt45461_28.kt - b4c2a29090f665162928a29d61257924 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_29.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_29.antlrtree.txt index b45ba5dc2..d0312f451 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_29.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_29.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_29.kt - c3cca17c038be0815a2e99b4e727d0e1 +File: kt45461_29.kt - 46eb7d8ee2988af7909538a3d83a8ee6 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_30.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_30.antlrtree.txt index 444e7725e..f92f360c3 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_30.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_30.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_30.kt - f6386789ff28940e97ebf06078e87542 +File: kt45461_30.kt - d125448f55ed6f8974f06e4de1af90a9 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_31.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_31.antlrtree.txt index 924ece4e2..4a372afe0 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_31.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_31.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_31.kt - 59a624d045c5da6530121a832e1534c9 +File: kt45461_31.kt - 905de04f53e1c956127feb4c15fb2c97 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_32.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_32.antlrtree.txt index e3ed892ee..4d0ff0a2c 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_32.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_32.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_32.kt - 9686856b753f24c75d62a456213b686a +File: kt45461_32.kt - a766a6448307574bbacd49da2a6c7e07 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_33.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_33.antlrtree.txt index 8bb03511b..5069b0cd8 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_33.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_33.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_33.kt - 486135c8a574d04461b5fd04025dceed +File: kt45461_33.kt - 256bdffee781c9c4cf97a4ad980cb991 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_34.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_34.antlrtree.txt index 0e9490c7e..ef7e9469a 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_34.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_34.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_34.kt - 93a4cec6d739cd2d9598c5d0c871a570 +File: kt45461_34.kt - 2c8e245c9c7b9441c47b0f7a440580a8 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35.antlrtree.txt index 34146ada2..8b7fb61b5 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_35.kt - ce1823ebf3a735da3fade741548e243b +File: kt45461_35.kt - 20f58df4520ee858c99ee6b109ee6387 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35_Enabled.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35_Enabled.antlrtree.txt index 9ad990a17..614645fa1 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35_Enabled.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_35_Enabled.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt45461_35_Enabled.kt - 2fa776d2fe88fc45a51446071fe12ebd +File: kt45461_35_Enabled.kt - ce4ff449a89fce6484d1a79dd7a4562d + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt52393.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt52393.antlrtree.txt index 1b38aa0b7..d97fdb929 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt52393.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt52393.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt52393.kt - 8cd8410d6096b7a409a2f75c4782484d +File: kt52393.kt - 22d16d1724d0e49b49a994b3fc1f22ea packageHeader importList topLevelObject @@ -451,4 +451,6 @@ File: kt52393.kt - 8cd8410d6096b7a409a2f75c4782484d semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes.antlrtree.txt index 4743297b4..89293dfe3 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes.antlrtree.txt @@ -1,4 +1,5 @@ -File: substitutingSuperTypes.kt - 1335ced8842b868ca55881b8759f73cd +File: substitutingSuperTypes.kt - 2cd606c21ab41c311d0a5cb34d4009a2 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes2.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes2.antlrtree.txt index baf531758..969f037ec 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes2.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/substitutingSuperTypes2.antlrtree.txt @@ -1,4 +1,5 @@ -File: substitutingSuperTypes2.kt - 6a99cd91b0e36746a0ccc66385e6a4e3 +File: substitutingSuperTypes2.kt - 7ff29a95ca5ed35f112f5e9c0cf069dc + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/hasErrorInConstrainingTypes.antlrtree.txt b/grammar/testData/diagnostics/inference/hasErrorInConstrainingTypes.antlrtree.txt index 26f25fd2a..9f25d7ff2 100644 --- a/grammar/testData/diagnostics/inference/hasErrorInConstrainingTypes.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/hasErrorInConstrainingTypes.antlrtree.txt @@ -1,4 +1,5 @@ -File: hasErrorInConstrainingTypes.kt - 319cbb608bce1a2694b3c75f2a902b24 +File: hasErrorInConstrainingTypes.kt - b5dc0439feeff0af3a7c42b6fcd2b9ac + NL("\n") packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/inference/nonFunctionalExpectedTypeForLambdaArgument.antlrtree.txt b/grammar/testData/diagnostics/inference/nonFunctionalExpectedTypeForLambdaArgument.antlrtree.txt index fb33d04ec..7deae9175 100644 --- a/grammar/testData/diagnostics/inference/nonFunctionalExpectedTypeForLambdaArgument.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/nonFunctionalExpectedTypeForLambdaArgument.antlrtree.txt @@ -1,4 +1,5 @@ -File: nonFunctionalExpectedTypeForLambdaArgument.kt - 6a1e6bd1f41252e3bc9018e131c872a7 +File: nonFunctionalExpectedTypeForLambdaArgument.kt - 445d3d0b06feab79080ae8004f230924 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/nothingType/specialCallWithMaterializeAndExpectedType.antlrtree.txt b/grammar/testData/diagnostics/inference/nothingType/specialCallWithMaterializeAndExpectedType.antlrtree.txt index f2dc6de25..bf60a4299 100644 --- a/grammar/testData/diagnostics/inference/nothingType/specialCallWithMaterializeAndExpectedType.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/nothingType/specialCallWithMaterializeAndExpectedType.antlrtree.txt @@ -1,4 +1,5 @@ -File: specialCallWithMaterializeAndExpectedType.kt - af0b13b5c249167143fde65942752ef9 +File: specialCallWithMaterializeAndExpectedType.kt - 27f9f005a4315502fe300f9fa0e9290b + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/recursiveLocalFuns/localFactorial.antlrtree.txt b/grammar/testData/diagnostics/inference/recursiveLocalFuns/localFactorial.antlrtree.txt index 8fd08adf2..bb949d06a 100644 --- a/grammar/testData/diagnostics/inference/recursiveLocalFuns/localFactorial.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/recursiveLocalFuns/localFactorial.antlrtree.txt @@ -1,5 +1,4 @@ -File: localFactorial.kt - 08a650fe6457dea127da5fbab1e49bc2 - NL("\n") +File: localFactorial.kt - 457cced47845959e60902ce5e0810c8c NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveFun.antlrtree.txt b/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveFun.antlrtree.txt index 56e2a4883..cf5b10149 100644 --- a/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveFun.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveFun.antlrtree.txt @@ -1,5 +1,4 @@ -File: recursiveFun.kt - ad49a194a35c757403567bf3f6b061e5 - NL("\n") +File: recursiveFun.kt - 233bc2b08118613373c308bb6e2ba937 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveLambda.antlrtree.txt b/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveLambda.antlrtree.txt index c62095610..aa07b3450 100644 --- a/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveLambda.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/recursiveLocalFuns/recursiveLambda.antlrtree.txt @@ -1,5 +1,4 @@ -File: recursiveLambda.kt - 77736b0d41115af9dbab1345caf28d60 - NL("\n") +File: recursiveLambda.kt - 7a136554295927e8a7280e20eb07c204 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/recursiveLocalFuns/selfCall.antlrtree.txt b/grammar/testData/diagnostics/inference/recursiveLocalFuns/selfCall.antlrtree.txt index 0dbbb18f5..95060d30c 100644 --- a/grammar/testData/diagnostics/inference/recursiveLocalFuns/selfCall.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/recursiveLocalFuns/selfCall.antlrtree.txt @@ -1,5 +1,4 @@ -File: selfCall.kt - c2c131ab753dd5d88a87ce010496c01f - NL("\n") +File: selfCall.kt - cd82295f0da368146283d957070ed504 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/regressions/kt2057.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt2057.antlrtree.txt index 9da7e8d91..7bf894de5 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt2057.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt2057.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt2057.kt - e653a959c6c80063c29920ab65468759 +File: kt2057.kt - 86bdd5d298e2d6405002492a82177160 NL("\n") NL("\n") NL("\n") @@ -370,4 +370,5 @@ File: kt2057.kt - e653a959c6c80063c29920ab65468759 RPAREN(")") COMMA(",") RPAREN(")") + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/regressions/kt2841.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt2841.antlrtree.txt index 0f628fcfb..92a9f3a18 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt2841.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt2841.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt2841.kt - 5765890331b7ad96ac21a1b783715269 +File: kt2841.kt - 9b3d704f27033630d121ebc719b91d03 + NL("\n") NL("\n") packageHeader PACKAGE("package") diff --git a/grammar/testData/diagnostics/inference/regressions/kt2841_it.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt2841_it.antlrtree.txt index 2fb40a424..a77b3b2cb 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt2841_it.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt2841_it.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt2841_it.kt - 0b0a224af953f0b71eaaea982628ec9a +File: kt2841_it.kt - c5a42fc476635e0270b283361d6c319a + NL("\n") NL("\n") packageHeader PACKAGE("package") diff --git a/grammar/testData/diagnostics/inference/regressions/kt2841_it_this.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt2841_it_this.antlrtree.txt index e5f5abd06..2c3b500ed 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt2841_it_this.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt2841_it_this.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt2841_it_this.kt - 2372ae9494c70ec606875073a0a8eb82 +File: kt2841_it_this.kt - e9c1b0ebbfe5916763189c2adc5136bc + NL("\n") NL("\n") packageHeader PACKAGE("package") diff --git a/grammar/testData/diagnostics/inference/regressions/kt2841_this.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt2841_this.antlrtree.txt index c6b1553d0..0bad1ab00 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt2841_this.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt2841_this.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt2841_this.kt - 4ee1d1b523bb3b201246acf0b283a4a9 +File: kt2841_this.kt - bb3a58345e3837a8333f0535ed326de8 + NL("\n") NL("\n") packageHeader PACKAGE("package") diff --git a/grammar/testData/diagnostics/inference/regressions/kt37419.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt37419.antlrtree.txt index 8f75847ee..1d43041c4 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt37419.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt37419.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt37419.kt - 6fd8f2de8d090f9ac85c01ef4e57e040 +File: kt37419.kt - eaab0722b61910c1afdf9118998832fb + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inference/regressions/kt41386.antlrtree.txt b/grammar/testData/diagnostics/inference/regressions/kt41386.antlrtree.txt index 02b9977ca..6db829348 100644 --- a/grammar/testData/diagnostics/inference/regressions/kt41386.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/regressions/kt41386.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt41386.kt - 0d358f7cd122b634289ec56643b25cc4 - NL("\n") +File: kt41386.kt - 324559f96f352b47db85618998283e75 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/reportAboutUnresolvedReferenceAsUnresolved.antlrtree.txt b/grammar/testData/diagnostics/inference/reportAboutUnresolvedReferenceAsUnresolved.antlrtree.txt index d96fff4d1..ea11cfba3 100644 --- a/grammar/testData/diagnostics/inference/reportAboutUnresolvedReferenceAsUnresolved.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/reportAboutUnresolvedReferenceAsUnresolved.antlrtree.txt @@ -1,4 +1,5 @@ -File: reportAboutUnresolvedReferenceAsUnresolved.kt - 182266b5476e04cccbf27d55d743265c +File: reportAboutUnresolvedReferenceAsUnresolved.kt - 28cc6d991cb0358b4c4fe49e2849d5b9 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.antlrtree.txt b/grammar/testData/diagnostics/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.antlrtree.txt index 32f8b6937..775cd6582 100644 --- a/grammar/testData/diagnostics/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.antlrtree.txt @@ -1,4 +1,5 @@ -File: NoAmbiguityForDifferentFunctionTypes.kt - e5825c46641f69812bec73fc610802c3 +File: NoAmbiguityForDifferentFunctionTypes.kt - 5927929e0567398658515d37a91b39f7 + NL("\n") NL("\n") packageHeader PACKAGE("package") diff --git a/grammar/testData/diagnostics/inference/substitutions/hideLocalTypeForReturnTypeOfSingleExpressionFunction.antlrtree.txt b/grammar/testData/diagnostics/inference/substitutions/hideLocalTypeForReturnTypeOfSingleExpressionFunction.antlrtree.txt index eeacee56e..b8d22731d 100644 --- a/grammar/testData/diagnostics/inference/substitutions/hideLocalTypeForReturnTypeOfSingleExpressionFunction.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/substitutions/hideLocalTypeForReturnTypeOfSingleExpressionFunction.antlrtree.txt @@ -1,4 +1,4 @@ -File: hideLocalTypeForReturnTypeOfSingleExpressionFunction.kt - 64d30473c2e46b49bd70c132fd60d567 +File: hideLocalTypeForReturnTypeOfSingleExpressionFunction.kt - de3f39a938281e6606660212246913a6 NL("\n") NL("\n") NL("\n") @@ -780,4 +780,1005 @@ File: hideLocalTypeForReturnTypeOfSingleExpressionFunction.kt - 64d30473c2e46b49 RPAREN(")") NL("\n") RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I2") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("A") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("B") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I3") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RPAREN(")") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + Identifier("f") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + Identifier("f1") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + IN("in") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + RANGLE(">") + simpleIdentifier + Identifier("f2") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I2") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("W") + RANGLE(">") + simpleIdentifier + Identifier("f3") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("y") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I2") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RANGLE(">") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + modifier + visibilityModifier + PRIVATE("private") + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("W") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("f4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RANGLE(">") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + thisExpression + THIS_AT("this@f4") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("foo") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("x") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("f") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g1") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("f1") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g2") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("f2") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("g3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f3") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("f3") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("3") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("V") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("W") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I3") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("g4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("block") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("W") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("V") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f4") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("block") + RPAREN(")") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/underscoredTypeInForbiddenPositions.antlrtree.txt b/grammar/testData/diagnostics/inference/underscoredTypeInForbiddenPositions.antlrtree.txt index 5c5babf9c..c1b7d14e8 100644 --- a/grammar/testData/diagnostics/inference/underscoredTypeInForbiddenPositions.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/underscoredTypeInForbiddenPositions.antlrtree.txt @@ -1,4 +1,5 @@ -File: underscoredTypeInForbiddenPositions.kt - abcd8e067c4507d5df98498ca8fc532b (WITH_ERRORS) +File: underscoredTypeInForbiddenPositions.kt - 84b737ee90b917a92bbeda706ed4186a (WITH_ERRORS) + NL("\n") NL("\n") NL("\n") NL("\n") @@ -1924,42 +1925,27 @@ File: underscoredTypeInForbiddenPositions.kt - abcd8e067c4507d5df98498ca8fc532b delegationSpecifiers annotatedDelegationSpecifier delegationSpecifier - userType - simpleUserType - simpleIdentifier - Identifier("Foo") - comparisonOperator - LANGLE("<") - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("_") - comparisonOperator - RANGLE(">") - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - functionLiteral - lambdaLiteral + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("_") + RANGLE(">") + valueArguments + LPAREN("(") + RPAREN(")") + classBody LCURL("{") - statements + classMemberDeclarations RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/inline/defaultLambdaInlining.antlrtree.txt b/grammar/testData/diagnostics/inline/defaultLambdaInlining.antlrtree.txt index fe8bc9c50..2c5a8db39 100644 --- a/grammar/testData/diagnostics/inline/defaultLambdaInlining.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/defaultLambdaInlining.antlrtree.txt @@ -1,4 +1,5 @@ -File: defaultLambdaInlining.kt - 9486f464689cfda15d60c86b07d4d493 +File: defaultLambdaInlining.kt - fc9c4f7e1161ec6f1e6196aa98dcb91b + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/inline/unaryExpressions/mathOperation.antlrtree.txt b/grammar/testData/diagnostics/inline/unaryExpressions/mathOperation.antlrtree.txt index 30c2ed442..78c221f06 100644 --- a/grammar/testData/diagnostics/inline/unaryExpressions/mathOperation.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/unaryExpressions/mathOperation.antlrtree.txt @@ -1,4 +1,5 @@ -File: mathOperation.kt - 4133c4c9e63f9ce0ea731e71e322e120 +File: mathOperation.kt - 55b714ea4c2d5588118bf94e2be43097 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/inlineClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt index 053fb0be6..a9e42e233 100644 --- a/grammar/testData/diagnostics/inlineClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt +++ b/grammar/testData/diagnostics/inlineClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt @@ -1,4 +1,5 @@ -File: unsignedLiteralsWithoutArtifactOnClasspath.kt - 58bd48b14280b2471667cc1ff10863e9 +File: unsignedLiteralsWithoutArtifactOnClasspath.kt - 92ed03c8b7bd1e313f7bbe58af0a80fa + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inner/constructorAccess.antlrtree.txt b/grammar/testData/diagnostics/inner/constructorAccess.antlrtree.txt index cda45ecbb..17ae5383b 100644 --- a/grammar/testData/diagnostics/inner/constructorAccess.antlrtree.txt +++ b/grammar/testData/diagnostics/inner/constructorAccess.antlrtree.txt @@ -1,5 +1,4 @@ -File: constructorAccess.kt - 2c01285507e68f29afac57d470b2f19a - NL("\n") +File: constructorAccess.kt - e541d03c779274e1895cbd8f0d8a7a11 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/inner/qualifiedExpression/constructNestedClass.antlrtree.txt b/grammar/testData/diagnostics/inner/qualifiedExpression/constructNestedClass.antlrtree.txt index 7087668ee..8f6d6457d 100644 --- a/grammar/testData/diagnostics/inner/qualifiedExpression/constructNestedClass.antlrtree.txt +++ b/grammar/testData/diagnostics/inner/qualifiedExpression/constructNestedClass.antlrtree.txt @@ -1,5 +1,4 @@ -File: constructNestedClass.kt - b5246b56d54c0d60d6c5bd9bfa077bec - NL("\n") +File: constructNestedClass.kt - c2584ef4356f0a970604e70d84e8797d packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/integerLiterals/constantUnaryOperators.antlrtree.txt b/grammar/testData/diagnostics/integerLiterals/constantUnaryOperators.antlrtree.txt index 3d92c5d72..118d3534d 100644 --- a/grammar/testData/diagnostics/integerLiterals/constantUnaryOperators.antlrtree.txt +++ b/grammar/testData/diagnostics/integerLiterals/constantUnaryOperators.antlrtree.txt @@ -1,5 +1,4 @@ -File: constantUnaryOperators.kt - 52585e5d20725fc9e58de3ae0d45027d - NL("\n") +File: constantUnaryOperators.kt - aefaad02beb79d2deed5c3d1f92afb21 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/kt11167.antlrtree.txt b/grammar/testData/diagnostics/kt11167.antlrtree.txt index 65a19a4d4..1287868ad 100644 --- a/grammar/testData/diagnostics/kt11167.antlrtree.txt +++ b/grammar/testData/diagnostics/kt11167.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt11167.kt - 698408fc2324680334d8009c660f6284 - NL("\n") +File: kt11167.kt - 378fb316079d4dbc7063b6b18bb41c25 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/kt49438.antlrtree.txt b/grammar/testData/diagnostics/kt49438.antlrtree.txt index f8e2172fb..676a3ae61 100644 --- a/grammar/testData/diagnostics/kt49438.antlrtree.txt +++ b/grammar/testData/diagnostics/kt49438.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt49438.kt - 5cacde938f0fa7d49ebb50d5bca03bfd +File: kt49438.kt - 5ef38d25b70dfd4ea5372faef22a6ca2 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/equalsOverrideInActualInterface.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/equalsOverrideInActualInterface.antlrtree.txt index 700a739de..5c69d0f03 100644 --- a/grammar/testData/diagnostics/multiplatform/headerClass/equalsOverrideInActualInterface.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/headerClass/equalsOverrideInActualInterface.antlrtree.txt @@ -1,5 +1,4 @@ -File: equalsOverrideInActualInterface.kt - fef9b1d550661604339cf5fbab998362 - NL("\n") +File: equalsOverrideInActualInterface.kt - 69ac17fbb829fe008537aa83fe5e1fb9 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/genericClassImplTypeAlias.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/genericClassImplTypeAlias.jvm.antlrtree.txt index 5afac4ce2..a9d0ada99 100644 --- a/grammar/testData/diagnostics/multiplatform/headerClass/genericClassImplTypeAlias.jvm.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/headerClass/genericClassImplTypeAlias.jvm.antlrtree.txt @@ -1,6 +1,52 @@ -File: genericClassImplTypeAlias.jvm.kt - eedba8b338c64339e393ee75107382ca +File: genericClassImplTypeAlias.jvm.kt - 8a04d2f2ec115e74fc6e1f2266a013fb packageHeader importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("A") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("B") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") topLevelObject declaration typeAlias @@ -184,6 +230,176 @@ File: genericClassImplTypeAlias.jvm.kt - eedba8b338c64339e393ee75107382ca RANGLE(">") semis NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("C51") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableMap") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("C52") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("F") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("MutableMap") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("F") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("C53") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + typeAlias + modifiers + modifier + platformModifier + ACTUAL("actual") + TYPE_ALIAS("typealias") + simpleIdentifier + Identifier("C54") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + ASSIGNMENT("=") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("B") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RANGLE(">") + semis + NL("\n") topLevelObject declaration typeAlias diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.diff b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.diff similarity index 100% rename from grammar/testData/diagnostics/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.diff rename to grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.diff diff --git a/grammar/testData/diagnostics/nullableTypes/safeCallOnNotNullableType.antlrtree.txt b/grammar/testData/diagnostics/nullableTypes/safeCallOnNotNullableType.antlrtree.txt index 100a365d2..26c4978f8 100644 --- a/grammar/testData/diagnostics/nullableTypes/safeCallOnNotNullableType.antlrtree.txt +++ b/grammar/testData/diagnostics/nullableTypes/safeCallOnNotNullableType.antlrtree.txt @@ -1,5 +1,4 @@ -File: safeCallOnNotNullableType.kt - 1676ae357a70382323ed62dd88dbc9aa - NL("\n") +File: safeCallOnNotNullableType.kt - 169936a7fc690914a9e80f1c5d829cd5 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/numbers/kt47447.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt47447.antlrtree.txt index 9861b9959..2c329938f 100644 --- a/grammar/testData/diagnostics/numbers/kt47447.antlrtree.txt +++ b/grammar/testData/diagnostics/numbers/kt47447.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt47447.kt - d6064a860dac75d1d08dd70cae657cf8 - NL("\n") +File: kt47447.kt - 103fd4bb2f8b25c94552d0a5c9e55ab8 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/numbers/kt47729.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt47729.antlrtree.txt index 09e570a8c..85b3430b8 100644 --- a/grammar/testData/diagnostics/numbers/kt47729.antlrtree.txt +++ b/grammar/testData/diagnostics/numbers/kt47729.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt47729.kt - 84f42d0d9005eb5561e3291ba6c0ec9e - NL("\n") +File: kt47729.kt - d3889d241ee23b4889815ec7ae82ff57 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/numbers/kt47729_parenthesis.antlrtree.txt b/grammar/testData/diagnostics/numbers/kt47729_parenthesis.antlrtree.txt index d2fdf7230..9694f6433 100644 --- a/grammar/testData/diagnostics/numbers/kt47729_parenthesis.antlrtree.txt +++ b/grammar/testData/diagnostics/numbers/kt47729_parenthesis.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt47729_parenthesis.kt - a3b98ffce9f9edc797f5a3ee52223d0b - NL("\n") +File: kt47729_parenthesis.kt - 6ed37c438d3946a517954d8f9a9e58f8 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/numbers/literalReceiverWithIntegerValueType.antlrtree.txt b/grammar/testData/diagnostics/numbers/literalReceiverWithIntegerValueType.antlrtree.txt index cf021053f..e45b09cca 100644 --- a/grammar/testData/diagnostics/numbers/literalReceiverWithIntegerValueType.antlrtree.txt +++ b/grammar/testData/diagnostics/numbers/literalReceiverWithIntegerValueType.antlrtree.txt @@ -1,5 +1,4 @@ -File: literalReceiverWithIntegerValueType.kt - 2053379b71af214d2d7190cabc6777ee - NL("\n") +File: literalReceiverWithIntegerValueType.kt - bfc18b6d0c7a94d8f05b3b005f29baf3 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_warning.antlrtree.txt b/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_warning.antlrtree.txt index aabca294f..8d73bb1cc 100644 --- a/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_warning.antlrtree.txt +++ b/grammar/testData/diagnostics/numbers/newLiteralOperatorsResolution_warning.antlrtree.txt @@ -1,5 +1,4 @@ -File: newLiteralOperatorsResolution_warning.kt - f84a0edde777aa70c8e276de19d713d8 - NL("\n") +File: newLiteralOperatorsResolution_warning.kt - 25f15daea222440ba557b62abe47d23b NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/objects/kt21515/callableReferenceComplexCasesWithImportsOld.antlrtree.txt b/grammar/testData/diagnostics/objects/kt21515/callableReferenceComplexCasesWithImportsOld.antlrtree.txt index 201b4e10c..b73acab4b 100644 --- a/grammar/testData/diagnostics/objects/kt21515/callableReferenceComplexCasesWithImportsOld.antlrtree.txt +++ b/grammar/testData/diagnostics/objects/kt21515/callableReferenceComplexCasesWithImportsOld.antlrtree.txt @@ -1,5 +1,4 @@ -File: callableReferenceComplexCasesWithImportsOld.kt - a3ad51bd2a64b8ce38a7dab363df2b97 - NL("\n") +File: callableReferenceComplexCasesWithImportsOld.kt - 8bb1a73e7a903fb3f19fb558bf880e7b NL("\n") NL("\n") packageHeader @@ -676,4 +675,6 @@ File: callableReferenceComplexCasesWithImportsOld.kt - a3ad51bd2a64b8ce38a7dab36 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.antlrtree.txt b/grammar/testData/diagnostics/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.antlrtree.txt index 74461dc09..26e895a98 100644 --- a/grammar/testData/diagnostics/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.antlrtree.txt +++ b/grammar/testData/diagnostics/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.antlrtree.txt @@ -1,5 +1,4 @@ -File: callableReferencesComplexCasesWithQualificationOld.kt - 8b44fd07ff54a90479d238b8fd62a7cd - NL("\n") +File: callableReferencesComplexCasesWithQualificationOld.kt - 50b950f7a3e880e0f9fe67892d57e344 NL("\n") NL("\n") NL("\n") @@ -683,4 +682,6 @@ File: callableReferencesComplexCasesWithQualificationOld.kt - 8b44fd07ff54a90479 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/operatorRem/modWithRemAssign.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/modWithRemAssign.antlrtree.txt index 621d082b1..38822751b 100644 --- a/grammar/testData/diagnostics/operatorRem/modWithRemAssign.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/modWithRemAssign.antlrtree.txt @@ -1,4 +1,5 @@ -File: modWithRemAssign.kt - d4cfc30afda16944960a46059d337c89 +File: modWithRemAssign.kt - 2752399d81e05557a1f2cd6db97e3b88 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/preferRemAsExtentionOverMod.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/preferRemAsExtentionOverMod.antlrtree.txt index 7be1bc2b6..ef9bc3592 100644 --- a/grammar/testData/diagnostics/operatorRem/preferRemAsExtentionOverMod.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/preferRemAsExtentionOverMod.antlrtree.txt @@ -1,4 +1,5 @@ -File: preferRemAsExtentionOverMod.kt - 2999627c2031ed6b9aa9c955c7ddcee8 +File: preferRemAsExtentionOverMod.kt - 9ada009c7ad1e2c3cadbf25120484a18 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/preferRemAsMemberOverMod.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/preferRemAsMemberOverMod.antlrtree.txt index 241024da7..6b8651a6f 100644 --- a/grammar/testData/diagnostics/operatorRem/preferRemAsMemberOverMod.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/preferRemAsMemberOverMod.antlrtree.txt @@ -1,4 +1,5 @@ -File: preferRemAsMemberOverMod.kt - 9a53da720bef8bfa93b32582eb186034 +File: preferRemAsMemberOverMod.kt - f525fbfc555463eb9b2069aec1da1333 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/preferRemFromCompanionObjectOverRem.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/preferRemFromCompanionObjectOverRem.antlrtree.txt index 43870c8c6..1377cfbd6 100644 --- a/grammar/testData/diagnostics/operatorRem/preferRemFromCompanionObjectOverRem.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/preferRemFromCompanionObjectOverRem.antlrtree.txt @@ -1,4 +1,5 @@ -File: preferRemFromCompanionObjectOverRem.kt - c82d92bb7ea48c8c624fb47ea78dc695 +File: preferRemFromCompanionObjectOverRem.kt - 60b1d28733f7f9aae6f47f4d29303524 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/preferRemOverModInLocalFunctions.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/preferRemOverModInLocalFunctions.antlrtree.txt index b6827476e..a1fa82240 100644 --- a/grammar/testData/diagnostics/operatorRem/preferRemOverModInLocalFunctions.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/preferRemOverModInLocalFunctions.antlrtree.txt @@ -1,4 +1,5 @@ -File: preferRemOverModInLocalFunctions.kt - 1af6451822b7e87ead9fffabea1828cf +File: preferRemOverModInLocalFunctions.kt - caadf129d3b4ce91b996aaa4de8d4fc7 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/preferRemWithImplicitReceivers.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/preferRemWithImplicitReceivers.antlrtree.txt index 3546609d3..ae38c9a3a 100644 --- a/grammar/testData/diagnostics/operatorRem/preferRemWithImplicitReceivers.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/preferRemWithImplicitReceivers.antlrtree.txt @@ -1,4 +1,5 @@ -File: preferRemWithImplicitReceivers.kt - 448adf71c2a6fc236c4843f395e3d981 +File: preferRemWithImplicitReceivers.kt - 13cd673ef4914e84431e6ac9f42d0595 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/prefereRemAsExtensionOverMemberMod.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/prefereRemAsExtensionOverMemberMod.antlrtree.txt index c80fd8e14..cbefb9f79 100644 --- a/grammar/testData/diagnostics/operatorRem/prefereRemAsExtensionOverMemberMod.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/prefereRemAsExtensionOverMemberMod.antlrtree.txt @@ -1,4 +1,5 @@ -File: prefereRemAsExtensionOverMemberMod.kt - 7c53ea76014b4788a90f47189bb666c3 +File: prefereRemAsExtensionOverMemberMod.kt - fb26f13b1bc6d71a2d181337c6b2b3f6 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/remWithModAndModAssign.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/remWithModAndModAssign.antlrtree.txt index 1dc5755e5..043ce5e16 100644 --- a/grammar/testData/diagnostics/operatorRem/remWithModAndModAssign.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/remWithModAndModAssign.antlrtree.txt @@ -1,4 +1,5 @@ -File: remWithModAndModAssign.kt - 48b1eaa861f3b8066804115864b94958 +File: remWithModAndModAssign.kt - 094e702fd772bd4d755371127a48f2ba + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/operatorRem/remWithModAssign.antlrtree.txt b/grammar/testData/diagnostics/operatorRem/remWithModAssign.antlrtree.txt index 9b83b44fc..bee2f190f 100644 --- a/grammar/testData/diagnostics/operatorRem/remWithModAssign.antlrtree.txt +++ b/grammar/testData/diagnostics/operatorRem/remWithModAssign.antlrtree.txt @@ -1,4 +1,5 @@ -File: remWithModAssign.kt - e45321ebb00d29086d3f9f0a62a18fcb +File: remWithModAssign.kt - 62f8d313b50c81aacda141d4768d7e2a + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/override/ConflictingFunctionSignatureFromSuperclass.antlrtree.txt b/grammar/testData/diagnostics/override/ConflictingFunctionSignatureFromSuperclass.antlrtree.txt index abe59d7a9..6068ec82a 100644 --- a/grammar/testData/diagnostics/override/ConflictingFunctionSignatureFromSuperclass.antlrtree.txt +++ b/grammar/testData/diagnostics/override/ConflictingFunctionSignatureFromSuperclass.antlrtree.txt @@ -1,4 +1,5 @@ -File: ConflictingFunctionSignatureFromSuperclass.kt - 69552d02184adb93d58604cb8f71f99b +File: ConflictingFunctionSignatureFromSuperclass.kt - 9ba9c7a0d2c6d462ff9e19e0e189a785 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/override/DefaultParameterValueInOverride.antlrtree.txt b/grammar/testData/diagnostics/override/DefaultParameterValueInOverride.antlrtree.txt index d8e62422a..924843bc3 100644 --- a/grammar/testData/diagnostics/override/DefaultParameterValueInOverride.antlrtree.txt +++ b/grammar/testData/diagnostics/override/DefaultParameterValueInOverride.antlrtree.txt @@ -1,4 +1,5 @@ -File: DefaultParameterValueInOverride.kt - 07ac700b6863345c618148257aa24b00 +File: DefaultParameterValueInOverride.kt - 1c9b1e5d92bae824952c71f15f816148 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/override/FakeOverrideModality3.antlrtree.txt b/grammar/testData/diagnostics/override/FakeOverrideModality3.antlrtree.txt index 2e32d2efd..0364af71f 100644 --- a/grammar/testData/diagnostics/override/FakeOverrideModality3.antlrtree.txt +++ b/grammar/testData/diagnostics/override/FakeOverrideModality3.antlrtree.txt @@ -1,4 +1,5 @@ -File: FakeOverrideModality3.kt - a590d0145c6f4de6943e158ab2c5a021 +File: FakeOverrideModality3.kt - f65495cda6a634941c4b8bc5648e0089 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/override/clashesOnInheritance/kt9550.antlrtree.txt b/grammar/testData/diagnostics/override/clashesOnInheritance/kt9550.antlrtree.txt index 991433ac1..b5d2a7c85 100644 --- a/grammar/testData/diagnostics/override/clashesOnInheritance/kt9550.antlrtree.txt +++ b/grammar/testData/diagnostics/override/clashesOnInheritance/kt9550.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt9550.kt - 782f2dabc5472a82c725c1b1c369a764 +File: kt9550.kt - 3c64acfbe893f63e914e1cb93018dbb3 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/properties/inferenceFromGetters/explicitGetterType.antlrtree.txt b/grammar/testData/diagnostics/properties/inferenceFromGetters/explicitGetterType.antlrtree.txt index 2af5dcfe2..983c13783 100644 --- a/grammar/testData/diagnostics/properties/inferenceFromGetters/explicitGetterType.antlrtree.txt +++ b/grammar/testData/diagnostics/properties/inferenceFromGetters/explicitGetterType.antlrtree.txt @@ -1,4 +1,5 @@ -File: explicitGetterType.kt - 8ca302f3df6139aba1053d3d3bdf3db3 +File: explicitGetterType.kt - efc73afe02852c06ad1b7cf28a81b517 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/properties/protectedGetterWithPublicSetter.k_test.antlrtree.txt b/grammar/testData/diagnostics/properties/protectedGetterWithPublicSetter.k_test.antlrtree.txt index 113f2eff6..f808bfe96 100644 --- a/grammar/testData/diagnostics/properties/protectedGetterWithPublicSetter.k_test.antlrtree.txt +++ b/grammar/testData/diagnostics/properties/protectedGetterWithPublicSetter.k_test.antlrtree.txt @@ -1,4 +1,4 @@ -File: protectedGetterWithPublicSetter.k_test.kt - de8b2c57d9f1196d4735da4b4b4a525a +File: protectedGetterWithPublicSetter.k_test.kt - 3568830d97e056daafab390a77916064 packageHeader PACKAGE("package") identifier @@ -257,9 +257,2173 @@ File: protectedGetterWithPublicSetter.k_test.kt - de8b2c57d9f1196d4735da4b4b4a52 RPAREN(")") semis NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anon1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Super") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testAnon") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anon2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testAnon") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") RCURL("}") semis NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Nested1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Super") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Super") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Nested2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Super") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("NonSub") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Super") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anon1") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Super") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testAnon") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("anon2") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("testAnon") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + classModifier + INNER("inner") + CLASS("class") + simpleIdentifier + Identifier("Nested1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Super") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Super") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Nested2") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Super") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("getName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + assignableSuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("name") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("s") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("setName") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/regressions/kt10843.antlrtree.txt b/grammar/testData/diagnostics/regressions/kt10843.antlrtree.txt index 7ca2a1d4c..0f2df4454 100644 --- a/grammar/testData/diagnostics/regressions/kt10843.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/kt10843.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt10843.kt - 8514b631a913c72bc4cfaf6f781a1fda +File: kt10843.kt - e66cc09286073540c461a45671ee7bf3 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/regressions/kt2768.antlrtree.txt b/grammar/testData/diagnostics/regressions/kt2768.antlrtree.txt index 4e0e7ffad..2df22c1dd 100644 --- a/grammar/testData/diagnostics/regressions/kt2768.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/kt2768.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt2768.kt - d1bf3f94c98ee05224f0e3f3fe01f84c - NL("\n") +File: kt2768.kt - aced1aac6c0946253a90841797d91c8e packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/regressions/kt4827.antlrtree.txt b/grammar/testData/diagnostics/regressions/kt4827.antlrtree.txt index 57eae21ff..3d56de70c 100644 --- a/grammar/testData/diagnostics/regressions/kt4827.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/kt4827.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt4827.kt - 3f529e5266a8d008388d2cd47a9e601e - NL("\n") +File: kt4827.kt - 6123db87b08a481ec9b9797bd492a119 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/regressions/kt9384.antlrtree.txt b/grammar/testData/diagnostics/regressions/kt9384.antlrtree.txt index 6e9a9df4a..49c315a3a 100644 --- a/grammar/testData/diagnostics/regressions/kt9384.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/kt9384.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt9384.kt - 95fbe34d85ad006ffd5d06e75ec3c930 - NL("\n") +File: kt9384.kt - 6199878ebd672ed20c8edf45a13f6a11 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/resolve/noCandidates/kt2787.antlrtree.txt b/grammar/testData/diagnostics/resolve/noCandidates/kt2787.antlrtree.txt index 2784f0bef..5bcf29a10 100644 --- a/grammar/testData/diagnostics/resolve/noCandidates/kt2787.antlrtree.txt +++ b/grammar/testData/diagnostics/resolve/noCandidates/kt2787.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt2787.kt - 83efeb7bcb1c36f333cad23c221139d4 - NL("\n") +File: kt2787.kt - db11a605827d3e2cd59fa1aef28564c9 packageHeader importList topLevelObject @@ -115,4 +114,6 @@ File: kt2787.kt - 83efeb7bcb1c36f333cad23c221139d4 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/resolve/noCandidates/resolvedToClassifier.antlrtree.txt b/grammar/testData/diagnostics/resolve/noCandidates/resolvedToClassifier.antlrtree.txt index b83cea47a..dea99695f 100644 --- a/grammar/testData/diagnostics/resolve/noCandidates/resolvedToClassifier.antlrtree.txt +++ b/grammar/testData/diagnostics/resolve/noCandidates/resolvedToClassifier.antlrtree.txt @@ -1,4 +1,4 @@ -File: resolvedToClassifier.kt - 2483bfa16ec3891d64cbe61828a6e73f +File: resolvedToClassifier.kt - d4e38057a5a24f055977056531aa61ea NL("\n") NL("\n") packageHeader @@ -249,6 +249,247 @@ File: resolvedToClassifier.kt - 2483bfa16ec3891d64cbe61828a6e73f LPAREN("(") RPAREN(")") NL("\n") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("baz") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrRef("$T") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + additiveOperator + ADD("+") + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("T") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("B") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("equals") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("T") + RPAREN(")") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("T") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("baz") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + RPAREN(")") + functionBody + block + LCURL("{") + statements RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/scopes/classHeader/delegation.antlrtree.txt b/grammar/testData/diagnostics/scopes/classHeader/delegation.antlrtree.txt index 268abf008..8dc66a039 100644 --- a/grammar/testData/diagnostics/scopes/classHeader/delegation.antlrtree.txt +++ b/grammar/testData/diagnostics/scopes/classHeader/delegation.antlrtree.txt @@ -1,5 +1,4 @@ -File: delegation.kt - 7e30d5cd639dc58bb9102acbf879c285 - NL("\n") +File: delegation.kt - a3ec4ef0d521101f00ee9cbb269899f1 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/scopes/classHeader/superConstructorArguments.antlrtree.txt b/grammar/testData/diagnostics/scopes/classHeader/superConstructorArguments.antlrtree.txt index 93ffc5aa4..5cc6d58cf 100644 --- a/grammar/testData/diagnostics/scopes/classHeader/superConstructorArguments.antlrtree.txt +++ b/grammar/testData/diagnostics/scopes/classHeader/superConstructorArguments.antlrtree.txt @@ -1,5 +1,4 @@ -File: superConstructorArguments.kt - cc564016dc671bec5c27e1072ff2c583 - NL("\n") +File: superConstructorArguments.kt - fb2320f78e931c33dd97db6324ef6f30 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/scopes/invisibleSetter.antlrtree.txt b/grammar/testData/diagnostics/scopes/invisibleSetter.antlrtree.txt index e5c767760..f4e92d965 100644 --- a/grammar/testData/diagnostics/scopes/invisibleSetter.antlrtree.txt +++ b/grammar/testData/diagnostics/scopes/invisibleSetter.antlrtree.txt @@ -1,5 +1,4 @@ -File: invisibleSetter.kt - a3bb5dfb955435e8080529daf49ef5c9 - NL("\n") +File: invisibleSetter.kt - c0cb75f852f0d7ac582d9a3121cd967c packageHeader importList topLevelObject @@ -161,4 +160,6 @@ File: invisibleSetter.kt - a3bb5dfb955435e8080529daf49ef5c9 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.antlrtree.txt index e540cc5b6..bb86bc7f4 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.antlrtree.txt @@ -1,4 +1,5 @@ -File: accessBaseGenericFromInnerExtendingSameBase.kt - 8e3c57c475075e2ae746402bfd738dec +File: accessBaseGenericFromInnerExtendingSameBase.kt - 4cc0a5cbd628585ef1ab0d62b5aa8e49 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.antlrtree.txt index 553b21a02..2d49f9280 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.antlrtree.txt @@ -1,4 +1,5 @@ -File: accessBaseGenericFromInnerExtendingSameBase2.kt - e906def59af4c52606d6a7ced86cc4f3 +File: accessBaseGenericFromInnerExtendingSameBase2.kt - cb7282874e86fe1a2b36977c31cace76 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.antlrtree.txt index 261e8a3e0..1af72b9f4 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.antlrtree.txt @@ -1,4 +1,5 @@ -File: accessBaseWithSameExtension.kt - f5ab17f5651bbd0022223a7d3a3934d5 +File: accessBaseWithSameExtension.kt - 67974fe0ac4dd0fa619271f57133d3ba + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.antlrtree.txt index 50e56c126..5eb2af608 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.antlrtree.txt @@ -1,4 +1,5 @@ -File: accessGenericBaseWithSameExtension.kt - 591b42742673b31b5c83aa9809990daf +File: accessGenericBaseWithSameExtension.kt - a7ace13c2081c7b734b96bd89ea453f4 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/operatorCall.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/operatorCall.antlrtree.txt index 15a1febad..090daee17 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/operatorCall.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/operatorCall.antlrtree.txt @@ -1,4 +1,5 @@ -File: operatorCall.kt - b091aee5517fed00a4a151fcf597d429 +File: operatorCall.kt - 304df3041a78da9e1e1d16a7905af311 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.antlrtree.txt index 848898c88..e6a0ec5cb 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.antlrtree.txt @@ -1,4 +1,5 @@ -File: thisAsExtensionReceiver.kt - d29fb2af487ac049b3024d5380b91576 +File: thisAsExtensionReceiver.kt - d12f2c6f15fd68ba643d1e210b9e3dda + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/secondaryConstructors/propertyInitializationWithoutPrimary.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/propertyInitializationWithoutPrimary.antlrtree.txt index 845c33f95..3e045046b 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/propertyInitializationWithoutPrimary.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/propertyInitializationWithoutPrimary.antlrtree.txt @@ -1,4 +1,5 @@ -File: propertyInitializationWithoutPrimary.kt - 70c69ab672a3a3528b6371220702d18c +File: propertyInitializationWithoutPrimary.kt - 28fcf245d030ad0538d66e597f1c2139 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/secondaryConstructors/reportResolutionErrorOnImplicitOnce.antlrtree.txt b/grammar/testData/diagnostics/secondaryConstructors/reportResolutionErrorOnImplicitOnce.antlrtree.txt index 700140be2..b174e6887 100644 --- a/grammar/testData/diagnostics/secondaryConstructors/reportResolutionErrorOnImplicitOnce.antlrtree.txt +++ b/grammar/testData/diagnostics/secondaryConstructors/reportResolutionErrorOnImplicitOnce.antlrtree.txt @@ -1,4 +1,5 @@ -File: reportResolutionErrorOnImplicitOnce.kt - 891ec86aa6ade9f21772a89c082a4729 +File: reportResolutionErrorOnImplicitOnce.kt - 5a5ed686059ae1d4d31be4ae908628b0 + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/smartCasts/elvis/basicOff.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/elvis/basicOff.antlrtree.txt index e3f487554..27d93f05d 100644 --- a/grammar/testData/diagnostics/smartCasts/elvis/basicOff.antlrtree.txt +++ b/grammar/testData/diagnostics/smartCasts/elvis/basicOff.antlrtree.txt @@ -1,5 +1,4 @@ -File: basicOff.kt - 8e94993cc005495532c1392c2b259067 - NL("\n") +File: basicOff.kt - 75c041bf5aefc5b8867837ed652fd9e1 NL("\n") NL("\n") packageHeader @@ -866,4 +865,6 @@ File: basicOff.kt - 8e94993cc005495532c1392c2b259067 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/smartCasts/loops/doWhileEarlyContinue.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/loops/doWhileEarlyContinue.antlrtree.txt index 979d00f95..b9cc85d67 100644 --- a/grammar/testData/diagnostics/smartCasts/loops/doWhileEarlyContinue.antlrtree.txt +++ b/grammar/testData/diagnostics/smartCasts/loops/doWhileEarlyContinue.antlrtree.txt @@ -1,4 +1,5 @@ -File: doWhileEarlyContinue.kt - 786c283c804143f21f39bc9a723cc081 +File: doWhileEarlyContinue.kt - 793fe69074b12a3cf60a65e478f30d5f + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/sourceCompatibility/noMultiplatformProjects.antlrtree.txt b/grammar/testData/diagnostics/sourceCompatibility/noMultiplatformProjects.antlrtree.txt index 628e13c21..de8f3b63b 100644 --- a/grammar/testData/diagnostics/sourceCompatibility/noMultiplatformProjects.antlrtree.txt +++ b/grammar/testData/diagnostics/sourceCompatibility/noMultiplatformProjects.antlrtree.txt @@ -1,4 +1,4 @@ -File: noMultiplatformProjects.kt - 5996ae93f71b45ead41588f70be7d565 +File: noMultiplatformProjects.kt - f4388798cbd43a3019200976304e4e99 packageHeader importList topLevelObject @@ -56,7 +56,110 @@ File: noMultiplatformProjects.kt - 5996ae93f71b45ead41588f70be7d565 EXPECT("expect") CLASS("class") simpleIdentifier - Identifier("Baz1") + Identifier("ImplicitExpect") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("ExplicitExpect") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + FUN("fun") + simpleIdentifier + Identifier("explicitFoo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("explicitX") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + CLASS("class") + simpleIdentifier + Identifier("ExplicitInner") + semis + NL("\n") + RCURL("}") semis NL("\n") NL("\n") @@ -126,4 +229,91 @@ File: noMultiplatformProjects.kt - 5996ae93f71b45ead41588f70be7d565 Identifier("Baz2") semis NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("ImplicitExpect") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + classMemberDeclaration + declaration + classDeclaration + modifiers + modifier + platformModifier + ACTUAL("actual") + CLASS("class") + simpleIdentifier + Identifier("Inner") + semis + NL("\n") + RCURL("}") EOF("") diff --git a/grammar/testData/diagnostics/targetedBuiltIns/backwardCompatibility/finalize.antlrtree.txt b/grammar/testData/diagnostics/targetedBuiltIns/backwardCompatibility/finalize.antlrtree.txt index ecb0b100f..c119c657d 100644 --- a/grammar/testData/diagnostics/targetedBuiltIns/backwardCompatibility/finalize.antlrtree.txt +++ b/grammar/testData/diagnostics/targetedBuiltIns/backwardCompatibility/finalize.antlrtree.txt @@ -1,4 +1,5 @@ -File: finalize.kt - 244393b87e7bbf402b0da46deb13a0a3 +File: finalize.kt - fbd7b14f1619e1c9fcbecfde248abe08 + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/diagnostics.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/diagnostics.antlrtree.txt index 9f5f0f82f..027698cae 100644 --- a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/diagnostics.antlrtree.txt +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/diagnostics.antlrtree.txt @@ -1,4 +1,5 @@ -File: diagnostics.kt - 96f988ddc8e4823100f925df2b12b326 +File: diagnostics.kt - cb0d59178be62f2cdaa08637d0d4876d + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecords.main.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecords.main.antlrtree.txt index 4365c4ecf..8b94d687c 100644 --- a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecords.main.antlrtree.txt +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/simpleRecords.main.antlrtree.txt @@ -1,6 +1,102 @@ -File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 +File: simpleRecords.main.kt - d02b1b1c1604234c549e7a1b7e7d884f packageHeader importList + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeInt") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeCharSequence") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("s") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("CharSequence") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("takeStringArray") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + typeProjectionModifiers + typeProjectionModifier + varianceModifier + OUT("out") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") topLevelObject declaration functionDeclaration @@ -49,6 +145,28 @@ File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 callSuffix valueArguments LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + COMMA(",") valueArgument expression disjunction @@ -89,6 +207,32 @@ File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 stringLiteral lineStringLiteral QUOTE_OPEN(""") + lineStringContent + LineStrText("a") + QUOTE_CLOSE(""") + COMMA(",") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("b") QUOTE_CLOSE(""") RPAREN(")") semis @@ -112,17 +256,41 @@ File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 postfixUnaryExpression primaryExpression simpleIdentifier - Identifier("mr") - postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("x") + Identifier("takeCharSequence") postfixUnarySuffix callSuffix valueArguments LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") RPAREN(")") semis NL("\n") @@ -144,17 +312,97 @@ File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 postfixUnaryExpression primaryExpression simpleIdentifier - Identifier("mr") + Identifier("takeInt") postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("y") + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("y") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeStringArray") postfixUnarySuffix callSuffix valueArguments LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("z") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") RPAREN(")") semis NL("\n") @@ -177,13 +425,88 @@ File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 postfixUnaryExpression primaryExpression simpleIdentifier - Identifier("mr") + Identifier("takeCharSequence") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("x") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("takeInt") postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("x") + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("y") + RPAREN(")") semis NL("\n") statement @@ -204,13 +527,37 @@ File: simpleRecords.main.kt - 4bc05bbae87e4687862c8ed4c73b01f7 postfixUnaryExpression primaryExpression simpleIdentifier - Identifier("mr") + Identifier("takeStringArray") postfixUnarySuffix - navigationSuffix - memberAccessOperator - DOT(".") - simpleIdentifier - Identifier("y") + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mr") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("z") + RPAREN(")") semis NL("\n") RCURL("}") diff --git a/grammar/testData/diagnostics/typeParameters/kt46186.antlrtree.txt b/grammar/testData/diagnostics/typeParameters/kt46186.antlrtree.txt index 14d013d85..6dc92ebff 100644 --- a/grammar/testData/diagnostics/typeParameters/kt46186.antlrtree.txt +++ b/grammar/testData/diagnostics/typeParameters/kt46186.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt46186.kt - c3181012dd371e64ee8cbd15a518b241 +File: kt46186.kt - a0888289b6c096dd3c5d44f87c6e70ae + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/typealias/capturingTypeParametersFromOuterClass.antlrtree.txt b/grammar/testData/diagnostics/typealias/capturingTypeParametersFromOuterClass.antlrtree.txt index 4f6b04432..abebfb36b 100644 --- a/grammar/testData/diagnostics/typealias/capturingTypeParametersFromOuterClass.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/capturingTypeParametersFromOuterClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: capturingTypeParametersFromOuterClass.kt - 05d5570c0598ac6e16968fc20757b52b +File: capturingTypeParametersFromOuterClass.kt - 9df70a79ceba39af2fea677cbd7400b6 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/typealias/exposedExpandedType.antlrtree.txt b/grammar/testData/diagnostics/typealias/exposedExpandedType.antlrtree.txt index 6e54d2f6a..f2f69f2da 100644 --- a/grammar/testData/diagnostics/typealias/exposedExpandedType.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/exposedExpandedType.antlrtree.txt @@ -1,4 +1,5 @@ -File: exposedExpandedType.kt - d3377670474e7c17ce4a1f41ac55311b +File: exposedExpandedType.kt - a305292f638c8d78344a59866670d8ee + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.2.antlrtree.txt b/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.2.antlrtree.txt index ccd714b8f..dc90c16a8 100644 --- a/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.2.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/importFromTypeAliasObject.2.antlrtree.txt @@ -1,4 +1,4 @@ -File: importFromTypeAliasObject.2.kt - 1104bd2383b45a42c7410d135413f634 +File: importFromTypeAliasObject.2.kt - 285b1af75b2f8f6ae2b458cd06c2f5fc packageHeader importList importHeader @@ -56,4 +56,6 @@ File: importFromTypeAliasObject.2.kt - 1104bd2383b45a42c7410d135413f634 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/typealias/inSupertypesList.antlrtree.txt b/grammar/testData/diagnostics/typealias/inSupertypesList.antlrtree.txt index fd1f7c4c5..c4d493181 100644 --- a/grammar/testData/diagnostics/typealias/inSupertypesList.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/inSupertypesList.antlrtree.txt @@ -1,4 +1,5 @@ -File: inSupertypesList.kt - dfc9dc5d68b1c58f1b595a0ceffc3329 +File: inSupertypesList.kt - 9aa62bc8cf26a9109160883486f3ec7d + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/typealias/kt19601.antlrtree.txt b/grammar/testData/diagnostics/typealias/kt19601.antlrtree.txt index 8c8e91bb5..e1e200977 100644 --- a/grammar/testData/diagnostics/typealias/kt19601.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/kt19601.antlrtree.txt @@ -1,5 +1,4 @@ -File: kt19601.kt - 37ab719a0723683bc040b5e4c4d17749 - NL("\n") +File: kt19601.kt - 5ebeb5129f84004a3c01193748a1ec97 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/typealias/nested.antlrtree.txt b/grammar/testData/diagnostics/typealias/nested.antlrtree.txt index 833822c23..b05c47aa7 100644 --- a/grammar/testData/diagnostics/typealias/nested.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/nested.antlrtree.txt @@ -1,4 +1,5 @@ -File: nested.kt - e4874a7446db573421358ee76f34d663 +File: nested.kt - 95a69dcb58c69e81ca79f4fdd117f6a0 + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/typealias/recursive.antlrtree.txt b/grammar/testData/diagnostics/typealias/recursive.antlrtree.txt index be74121e9..25b116d7b 100644 --- a/grammar/testData/diagnostics/typealias/recursive.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/recursive.antlrtree.txt @@ -1,5 +1,4 @@ -File: recursive.kt - a7dc000fd9791350d62a62a6d9df1b18 - NL("\n") +File: recursive.kt - c767fe093056bf48451d81f32feb0602 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/typealias/typeAliasConstructorForInterface.antlrtree.txt b/grammar/testData/diagnostics/typealias/typeAliasConstructorForInterface.antlrtree.txt index 30e4073da..a7632d134 100644 --- a/grammar/testData/diagnostics/typealias/typeAliasConstructorForInterface.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/typeAliasConstructorForInterface.antlrtree.txt @@ -1,4 +1,4 @@ -File: typeAliasConstructorForInterface.kt - 5dc63ef72ee84c37a65ac7d1bc8c198a +File: typeAliasConstructorForInterface.kt - 10cabdf13fb989a8374246ce2a8b64a6 packageHeader importList topLevelObject @@ -84,4 +84,5 @@ File: typeAliasConstructorForInterface.kt - 5dc63ef72ee84c37a65ac7d1bc8c198a primaryExpression simpleIdentifier Identifier("Test") + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/unsignedTypes/conversions/conversionOfSignedToUnsigned.test.antlrtree.txt b/grammar/testData/diagnostics/unsignedTypes/conversions/conversionOfSignedToUnsigned.test.antlrtree.txt index 52df8a8a6..112c0fce0 100644 --- a/grammar/testData/diagnostics/unsignedTypes/conversions/conversionOfSignedToUnsigned.test.antlrtree.txt +++ b/grammar/testData/diagnostics/unsignedTypes/conversions/conversionOfSignedToUnsigned.test.antlrtree.txt @@ -1,4 +1,4 @@ -File: conversionOfSignedToUnsigned.test.kt - 4f2cf3424c8facc37ef1422e18a1e731 +File: conversionOfSignedToUnsigned.test.kt - e3630238edd2553191406f3d26f6a154 packageHeader importList importHeader @@ -403,10 +403,19 @@ File: conversionOfSignedToUnsigned.test.kt - 4f2cf3424c8facc37ef1422e18a1e731 RCURL("}") semis NL("\n") - NL("\n") topLevelObject declaration functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("ExperimentalUnsignedTypes") + NL("\n") FUN("fun") simpleIdentifier Identifier("takeUBytes") diff --git a/grammar/testData/diagnostics/unsignedTypes/lateinitUnsignedType.antlrtree.txt b/grammar/testData/diagnostics/unsignedTypes/lateinitUnsignedType.antlrtree.txt index 3c2f53e8e..2a914542e 100644 --- a/grammar/testData/diagnostics/unsignedTypes/lateinitUnsignedType.antlrtree.txt +++ b/grammar/testData/diagnostics/unsignedTypes/lateinitUnsignedType.antlrtree.txt @@ -1,4 +1,5 @@ -File: lateinitUnsignedType.kt - 65e2119dabbde7851f1513801d8b3e4c +File: lateinitUnsignedType.kt - 18c472e589abec1dc79d9f7e66ddc43a + NL("\n") NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/valueClasses/basicValueClassDeclaration.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/basicValueClassDeclaration.antlrtree.txt index e3b637aa7..f2a61bd20 100644 --- a/grammar/testData/diagnostics/valueClasses/basicValueClassDeclaration.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/basicValueClassDeclaration.antlrtree.txt @@ -1,4 +1,5 @@ -File: basicValueClassDeclaration.kt - 43d4679fcc1f8eb8b84ea671c8e51de4 +File: basicValueClassDeclaration.kt - a2aa36e3cc924eb64c2666a2093b3832 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/basicValueClassDeclarationDisabled.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/basicValueClassDeclarationDisabled.antlrtree.txt index 528addf75..f4c908ba6 100644 --- a/grammar/testData/diagnostics/valueClasses/basicValueClassDeclarationDisabled.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/basicValueClassDeclarationDisabled.antlrtree.txt @@ -1,4 +1,5 @@ -File: basicValueClassDeclarationDisabled.kt - 635f056e27ebca46746cdfdfaaba5d44 +File: basicValueClassDeclarationDisabled.kt - 710d167496c5e5c8fc69e8dad7cd1a1a + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/constructorsJvmSignaturesClash.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/constructorsJvmSignaturesClash.antlrtree.txt index 51f89a062..67baeb95b 100644 --- a/grammar/testData/diagnostics/valueClasses/constructorsJvmSignaturesClash.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/constructorsJvmSignaturesClash.antlrtree.txt @@ -1,4 +1,5 @@ -File: constructorsJvmSignaturesClash.kt - 8e5557278868a6ee5331ce44eadd2216 +File: constructorsJvmSignaturesClash.kt - 326bafa957cbee7f7c7fa679702fa165 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/delegatedPropertyInValueClass.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/delegatedPropertyInValueClass.antlrtree.txt index 59cf0bcb7..0fb42451a 100644 --- a/grammar/testData/diagnostics/valueClasses/delegatedPropertyInValueClass.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/delegatedPropertyInValueClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: delegatedPropertyInValueClass.kt - fd63a0c22ffd36be5d6959acb5a37d93 +File: delegatedPropertyInValueClass.kt - 5d6b880d421d00f990f401743c02bef7 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesClash.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesClash.antlrtree.txt index 7446ad095..23d031e31 100644 --- a/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesClash.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesClash.antlrtree.txt @@ -1,4 +1,5 @@ -File: functionsJvmSignaturesClash.kt - 581d8ec618b882f1368df4ca63971e5a +File: functionsJvmSignaturesClash.kt - d435068b8b9da394507faf67fc9eea81 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesConflictOnInheritance.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesConflictOnInheritance.antlrtree.txt index 25640b286..b8ec70a73 100644 --- a/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesConflictOnInheritance.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/functionsJvmSignaturesConflictOnInheritance.antlrtree.txt @@ -1,4 +1,5 @@ -File: functionsJvmSignaturesConflictOnInheritance.kt - 6fb3377cc3c7d8d52b262740742b52c5 +File: functionsJvmSignaturesConflictOnInheritance.kt - dcfe7eb20be9ea16a88b1ce78095ea7b + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/identityComparisonWithValueClasses.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/identityComparisonWithValueClasses.antlrtree.txt index 94b01f558..ede192bbc 100644 --- a/grammar/testData/diagnostics/valueClasses/identityComparisonWithValueClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/identityComparisonWithValueClasses.antlrtree.txt @@ -1,4 +1,5 @@ -File: identityComparisonWithValueClasses.kt - 972735c2b4c3504151d2748ee2fad322 +File: identityComparisonWithValueClasses.kt - 53686220a3440fda9a3772a1a6d84a03 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/jvmInlineApplicability.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/jvmInlineApplicability.antlrtree.txt index 5544f01f2..a7fefa6cc 100644 --- a/grammar/testData/diagnostics/valueClasses/jvmInlineApplicability.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/jvmInlineApplicability.antlrtree.txt @@ -1,4 +1,5 @@ -File: jvmInlineApplicability.kt - feb53383f878e4902a48ba59246be3aa +File: jvmInlineApplicability.kt - 40ba5452a293ab7eaeaadfdd1b45e566 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/presenceOfInitializerBlockInsideValueClass.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/presenceOfInitializerBlockInsideValueClass.antlrtree.txt index 514e8fce3..3ec40f7fb 100644 --- a/grammar/testData/diagnostics/valueClasses/presenceOfInitializerBlockInsideValueClass.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/presenceOfInitializerBlockInsideValueClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: presenceOfInitializerBlockInsideValueClass.kt - 124f596d80e000b6690fbdd1f4d35102 +File: presenceOfInitializerBlockInsideValueClass.kt - c6146d6d3c37a7c97a1a151d52721559 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.antlrtree.txt index 966bf8a17..5a8c1d92b 100644 --- a/grammar/testData/diagnostics/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/presenceOfPublicPrimaryConstructorForValueClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: presenceOfPublicPrimaryConstructorForValueClass.kt - cb591a6df8eca13787f473acfb751241 +File: presenceOfPublicPrimaryConstructorForValueClass.kt - 00d5ec19de6121c37979352dddd5543a + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/propertiesWithBackingFieldsInsideValueClass.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/propertiesWithBackingFieldsInsideValueClass.antlrtree.txt index ab0423b59..f305a6ecb 100644 --- a/grammar/testData/diagnostics/valueClasses/propertiesWithBackingFieldsInsideValueClass.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/propertiesWithBackingFieldsInsideValueClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: propertiesWithBackingFieldsInsideValueClass.kt - 29fa064767506913eeccf286c15d412e +File: propertiesWithBackingFieldsInsideValueClass.kt - 25f0eb4ede1ee1a449a4b747023a5065 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt index 9fdd72da2..b44dcecb6 100644 --- a/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt @@ -1,19 +1,24 @@ -File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WITH_ERRORS) +File: recursiveMultiFieldValueClasses.kt - 27f23077cb2d62b5751be49c513cb6b6 (WITH_ERRORS) NL("\n") NL("\n") NL("\n") NL("\n") NL("\n") - NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") packageHeader importList topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -37,13 +42,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -80,13 +91,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -110,13 +127,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -153,13 +176,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -183,13 +212,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -214,13 +249,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -256,13 +297,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -298,13 +345,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -346,13 +399,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -394,13 +453,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -439,13 +504,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -486,13 +557,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT NL("\n") NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -539,13 +616,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -605,13 +688,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -670,13 +759,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -724,13 +819,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -789,13 +890,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -855,13 +962,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -926,13 +1039,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -1014,13 +1133,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT Identifier("I2") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -1248,13 +1373,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT Identifier("I2") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -1323,13 +1454,19 @@ File: recursiveMultiFieldValueClasses.kt - 8646e3c55df55c1efba323d4fa766f87 (WIT Identifier("I2") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") diff --git a/grammar/testData/diagnostics/valueClasses/recursiveValueClasses.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/recursiveValueClasses.antlrtree.txt index a6ee9f38a..413a1411c 100644 --- a/grammar/testData/diagnostics/valueClasses/recursiveValueClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/recursiveValueClasses.antlrtree.txt @@ -1,4 +1,5 @@ -File: recursiveValueClasses.kt - cfa18869ec8e0e2a5d1677d700230935 +File: recursiveValueClasses.kt - 80ca8c4096dc0753a143572f3f797aa4 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt index 053fb0be6..a9e42e233 100644 --- a/grammar/testData/diagnostics/valueClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/unsignedLiteralsWithoutArtifactOnClasspath.antlrtree.txt @@ -1,4 +1,5 @@ -File: unsignedLiteralsWithoutArtifactOnClasspath.kt - 58bd48b14280b2471667cc1ff10863e9 +File: unsignedLiteralsWithoutArtifactOnClasspath.kt - 92ed03c8b7bd1e313f7bbe58af0a80fa + NL("\n") packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/valueClasses/valueClassCanOnlyImplementInterfaces.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassCanOnlyImplementInterfaces.antlrtree.txt index ba85792eb..021ec7a76 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassCanOnlyImplementInterfaces.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassCanOnlyImplementInterfaces.antlrtree.txt @@ -1,4 +1,5 @@ -File: valueClassCanOnlyImplementInterfaces.kt - 867e57f62f4fd6d47069361d20f4b13f +File: valueClassCanOnlyImplementInterfaces.kt - e9d1517ac04968d101631a5403e97250 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassCannotImplementInterfaceByDelegation.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassCannotImplementInterfaceByDelegation.antlrtree.txt index 447380a0d..5bc764997 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassCannotImplementInterfaceByDelegation.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassCannotImplementInterfaceByDelegation.antlrtree.txt @@ -1,4 +1,5 @@ -File: valueClassCannotImplementInterfaceByDelegation.kt - ceeccee42a2e06624ed10a828af797b1 +File: valueClassCannotImplementInterfaceByDelegation.kt - 4b502a9529d635d6361d6b21d182a8c1 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassConstructorParameterWithDefaultValue.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassConstructorParameterWithDefaultValue.antlrtree.txt index 7f1b0dab5..65faf9992 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassConstructorParameterWithDefaultValue.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassConstructorParameterWithDefaultValue.antlrtree.txt @@ -1,4 +1,5 @@ -File: valueClassConstructorParameterWithDefaultValue.kt - 88330d6babb915a18808e13a3a7e9227 +File: valueClassConstructorParameterWithDefaultValue.kt - 860074b9d9ef815e6d6f14504efa228e + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassDeclarationCheck.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassDeclarationCheck.antlrtree.txt index 60cf3fba4..5275eb940 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassDeclarationCheck.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassDeclarationCheck.antlrtree.txt @@ -1,4 +1,5 @@ -File: valueClassDeclarationCheck.kt - 86e22d6f635f8653c2d3a87bdab8db1c +File: valueClassDeclarationCheck.kt - 6dc5a88cfcda624ea7738c5383df70ee + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassesInsideAnnotations.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassesInsideAnnotations.antlrtree.txt index e6d854f9e..f82ee00d2 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassesInsideAnnotations.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassesInsideAnnotations.antlrtree.txt @@ -1,4 +1,5 @@ -File: valueClassesInsideAnnotations.kt - 37953e12924ffe77d08a07c68a43f8be +File: valueClassesInsideAnnotations.kt - 324a2e132ef90593771400859d874556 + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/varargsOnParametersOfValueClassType.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/varargsOnParametersOfValueClassType.antlrtree.txt index a7ca6451c..f2afcb6ad 100644 --- a/grammar/testData/diagnostics/valueClasses/varargsOnParametersOfValueClassType.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/varargsOnParametersOfValueClassType.antlrtree.txt @@ -1,4 +1,5 @@ -File: varargsOnParametersOfValueClassType.kt - d6c4081b40c143c80ddf6217561e4109 +File: varargsOnParametersOfValueClassType.kt - e7997e36941b57520f0b23a2e0809b94 + NL("\n") NL("\n") NL("\n") NL("\n") From df68f794a56cdc389f2b7c31374611d0f681337d Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Wed, 26 Jul 2023 17:43:05 +0200 Subject: [PATCH 15/22] [1.9] Add changed grammar tests II --- .../DefaultValueForParameterInFunctionType.antlrtree.txt | 2 +- .../diagnostics/backingField/FieldAsParam.antlrtree.txt | 2 +- .../diagnostics/backingField/FieldInLocal.antlrtree.txt | 2 +- .../backingField/FieldReassignment_after.antlrtree.txt | 2 +- .../backingField/FieldReassignment_before.antlrtree.txt | 2 +- .../backingField/LocalDeclarations.antlrtree.txt | 2 +- .../delegatedPropertyEarlyAccess.antlrtree.txt | 2 +- .../typeParameterAsContextReceiver.antlrtree.txt | 2 +- .../emptyIntersectionTypes/kt45461_15.antlrtree.txt | 2 +- .../emptyIntersectionTypes/kt45461_19.antlrtree.txt | 2 +- .../emptyIntersectionTypes/kt45461_8.antlrtree.txt | 2 +- .../emptyIntersectionTypes/kt45461_9.antlrtree.txt | 2 +- .../diagnostics/initializedAfterRethrow.antlrtree.txt | 4 +--- .../diagnostics/j+k/rawTypeScope.main.antlrtree.txt | 2 +- .../diagnostics/j+k/rawUpperBounds.main.antlrtree.txt | 2 +- grammar/testData/diagnostics/kt435.antlrtree.txt | 2 +- .../expectedInheritsDefaultArguments.jvm.antlrtree.txt | 2 +- .../diagnostics/multiplatform/hmpp/simple.antlrtree.txt | 8 +------- .../rawTypes/rawTypeInUpperBound.main.antlrtree.txt | 2 +- .../loops/nestedDoWhileWithLongContinue.antlrtree.txt | 2 +- .../jvmRecord/jvmRecordDescriptorStructure.antlrtree.txt | 2 +- .../jvmRecord/supertypesCheck.antlrtree.txt | 2 +- .../valueClassImplementsCollection.antlrtree.txt | 2 +- 23 files changed, 23 insertions(+), 31 deletions(-) diff --git a/grammar/testData/diagnostics/DefaultValueForParameterInFunctionType.antlrtree.txt b/grammar/testData/diagnostics/DefaultValueForParameterInFunctionType.antlrtree.txt index b0c6aec0f..1b1cd5382 100644 --- a/grammar/testData/diagnostics/DefaultValueForParameterInFunctionType.antlrtree.txt +++ b/grammar/testData/diagnostics/DefaultValueForParameterInFunctionType.antlrtree.txt @@ -1,4 +1,4 @@ -File: DefaultValueForParameterInFunctionType.kt - bda33ae14be92f30c9a2a36525405322 (WITH_ERRORS) +File: DefaultValueForParameterInFunctionType.kt - fd66b4d7f802347ea5ebfbf67133cfc3 (WITH_ERRORS) NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/backingField/FieldAsParam.antlrtree.txt b/grammar/testData/diagnostics/backingField/FieldAsParam.antlrtree.txt index c6f3a081f..ec1904fe0 100644 --- a/grammar/testData/diagnostics/backingField/FieldAsParam.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/FieldAsParam.antlrtree.txt @@ -1,4 +1,4 @@ -File: FieldAsParam.kt - 80782fe7051015476a9d7ced87f0d243 +File: FieldAsParam.kt - cb09fa29b5d03cef99cb73c8794d6776 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/backingField/FieldInLocal.antlrtree.txt b/grammar/testData/diagnostics/backingField/FieldInLocal.antlrtree.txt index 42117a95b..dd11ae503 100644 --- a/grammar/testData/diagnostics/backingField/FieldInLocal.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/FieldInLocal.antlrtree.txt @@ -1,4 +1,4 @@ -File: FieldInLocal.kt - e430cfc432716b14e9276853c00120dd +File: FieldInLocal.kt - f8022ffb3f349351b3455220146d5439 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/backingField/FieldReassignment_after.antlrtree.txt b/grammar/testData/diagnostics/backingField/FieldReassignment_after.antlrtree.txt index 9862fc4b3..30c415415 100644 --- a/grammar/testData/diagnostics/backingField/FieldReassignment_after.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/FieldReassignment_after.antlrtree.txt @@ -1,4 +1,4 @@ -File: FieldReassignment_after.kt - dc53a9173470485b3841c75ff67de691 +File: FieldReassignment_after.kt - 226ac7cf116d3ee6f6eac9480cb6169d NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/backingField/FieldReassignment_before.antlrtree.txt b/grammar/testData/diagnostics/backingField/FieldReassignment_before.antlrtree.txt index 4120c742a..2e93035a8 100644 --- a/grammar/testData/diagnostics/backingField/FieldReassignment_before.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/FieldReassignment_before.antlrtree.txt @@ -1,4 +1,4 @@ -File: FieldReassignment_before.kt - 1dbcc2afa7ba0c220bbf3b6edd7ac407 +File: FieldReassignment_before.kt - 69e1c69a2503b599d74191965987bb9c NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/backingField/LocalDeclarations.antlrtree.txt b/grammar/testData/diagnostics/backingField/LocalDeclarations.antlrtree.txt index f95e6084b..e90eb56c8 100644 --- a/grammar/testData/diagnostics/backingField/LocalDeclarations.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/LocalDeclarations.antlrtree.txt @@ -1,4 +1,4 @@ -File: LocalDeclarations.kt - cee81d460041d55f0fc599e268750ce9 +File: LocalDeclarations.kt - 2172371888f49a10a88782ae58bde780 NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/delegatedPropertyEarlyAccess.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/delegatedPropertyEarlyAccess.antlrtree.txt index b759e9bc6..4bf121794 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/delegatedPropertyEarlyAccess.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/delegatedPropertyEarlyAccess.antlrtree.txt @@ -1,4 +1,4 @@ -File: delegatedPropertyEarlyAccess.kt - 0da1eb50a8a9283d4ca39ba1799510f5 +File: delegatedPropertyEarlyAccess.kt - 71d717bb83f34303737de73dc79efa1c NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/typeParameterAsContextReceiver.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/typeParameterAsContextReceiver.antlrtree.txt index f32654f3b..7da0c13b5 100644 --- a/grammar/testData/diagnostics/extensions/contextReceivers/typeParameterAsContextReceiver.antlrtree.txt +++ b/grammar/testData/diagnostics/extensions/contextReceivers/typeParameterAsContextReceiver.antlrtree.txt @@ -1,4 +1,4 @@ -File: typeParameterAsContextReceiver.kt - a8a0ef7d9a33481425bd28f48dc4c56d (WITH_ERRORS) +File: typeParameterAsContextReceiver.kt - 93378a17b47db47cb751814569a8a6c4 (WITH_ERRORS) NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_15.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_15.antlrtree.txt index 105215ecb..4cb9b1e50 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_15.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_15.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt45461_15.kt - 20290c9e0cea9cb9d95485fb444ca651 +File: kt45461_15.kt - 266d2f29812563086180a5a781996d79 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_19.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_19.antlrtree.txt index cb9328576..afcd0b04a 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_19.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_19.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt45461_19.kt - 21e07d98e6d31dcb88e35ba4a0387ec3 +File: kt45461_19.kt - e0e19896393f961df28897a7f0916054 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_8.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_8.antlrtree.txt index ef35130bc..610471c6c 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_8.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_8.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt45461_8.kt - 4c98eb8808f9314038d3e5eebfeff9d2 +File: kt45461_8.kt - 1cafd96b2ad186d6d25e3d26735b8140 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_9.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_9.antlrtree.txt index 490c05b76..b53c05f21 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_9.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_9.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt45461_9.kt - 36a93184920bc15509e3beef0aa786c4 +File: kt45461_9.kt - b1a2b6a75682537373481c8ccd3fbc6e NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/initializedAfterRethrow.antlrtree.txt b/grammar/testData/diagnostics/initializedAfterRethrow.antlrtree.txt index 7b13e30be..0f4d6a291 100644 --- a/grammar/testData/diagnostics/initializedAfterRethrow.antlrtree.txt +++ b/grammar/testData/diagnostics/initializedAfterRethrow.antlrtree.txt @@ -1,6 +1,4 @@ -File: initializedAfterRethrow.kt - af5de60135254fc689cf548c81fc7be2 - NL("\n") - NL("\n") +File: initializedAfterRethrow.kt - b5ebc8ae486bf3bd94287f4b118eaa36 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/j+k/rawTypeScope.main.antlrtree.txt b/grammar/testData/diagnostics/j+k/rawTypeScope.main.antlrtree.txt index b26a9de1f..3657bcb06 100644 --- a/grammar/testData/diagnostics/j+k/rawTypeScope.main.antlrtree.txt +++ b/grammar/testData/diagnostics/j+k/rawTypeScope.main.antlrtree.txt @@ -1,4 +1,4 @@ -File: rawTypeScope.main.kt - 9aa008c4a03219d71ed2b600f92f55b2 +File: rawTypeScope.main.kt - a5e1eba25483d9397bb53fe31c79ab86 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/j+k/rawUpperBounds.main.antlrtree.txt b/grammar/testData/diagnostics/j+k/rawUpperBounds.main.antlrtree.txt index eef4a4b0f..90fb3830b 100644 --- a/grammar/testData/diagnostics/j+k/rawUpperBounds.main.antlrtree.txt +++ b/grammar/testData/diagnostics/j+k/rawUpperBounds.main.antlrtree.txt @@ -1,4 +1,4 @@ -File: rawUpperBounds.main.kt - fdd418638a2175482c30c0e60114b0f4 +File: rawUpperBounds.main.kt - 46742782db9d5b47f5dd91e179654dbf packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/kt435.antlrtree.txt b/grammar/testData/diagnostics/kt435.antlrtree.txt index 51348eb7b..8fc1ffaa0 100644 --- a/grammar/testData/diagnostics/kt435.antlrtree.txt +++ b/grammar/testData/diagnostics/kt435.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt435.kt - 4f6de5e0bfff4ddb6d6bf4a40fbc5cd0 +File: kt435.kt - f10301e1febc1d3c1b97d8d7c94b5037 NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/multiplatform/defaultArguments/expectedInheritsDefaultArguments.jvm.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/defaultArguments/expectedInheritsDefaultArguments.jvm.antlrtree.txt index 9a764395c..424c57d8d 100644 --- a/grammar/testData/diagnostics/multiplatform/defaultArguments/expectedInheritsDefaultArguments.jvm.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/defaultArguments/expectedInheritsDefaultArguments.jvm.antlrtree.txt @@ -1,4 +1,4 @@ -File: expectedInheritsDefaultArguments.jvm.kt - 2aa51b91cdebe5635a6c3304d0bc8755 +File: expectedInheritsDefaultArguments.jvm.kt - bc078183880c7f2561b0eb836286df4d packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/simple.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/simple.antlrtree.txt index f461e9350..18fce1cc2 100644 --- a/grammar/testData/diagnostics/multiplatform/hmpp/simple.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/hmpp/simple.antlrtree.txt @@ -1,10 +1,4 @@ -File: simple.kt - ac5881b6fe5c633e511a45485b2d39a5 - NL("\n") - NL("\n") - NL("\n") - NL("\n") - NL("\n") - NL("\n") +File: simple.kt - 490d08fea8fc7f4c1ad092fe32fd4296 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeInUpperBound.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeInUpperBound.main.antlrtree.txt index a6e864c25..73a6799ff 100644 --- a/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeInUpperBound.main.antlrtree.txt +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/rawTypeInUpperBound.main.antlrtree.txt @@ -1,4 +1,4 @@ -File: rawTypeInUpperBound.main.kt - f85a28a2f711d2a3aa23a17fd928f356 +File: rawTypeInUpperBound.main.kt - 6f2aa80768e2738da7ac115701a58de7 packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/smartCasts/loops/nestedDoWhileWithLongContinue.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/loops/nestedDoWhileWithLongContinue.antlrtree.txt index 1bde1be4a..0fba948b4 100644 --- a/grammar/testData/diagnostics/smartCasts/loops/nestedDoWhileWithLongContinue.antlrtree.txt +++ b/grammar/testData/diagnostics/smartCasts/loops/nestedDoWhileWithLongContinue.antlrtree.txt @@ -1,4 +1,4 @@ -File: nestedDoWhileWithLongContinue.kt - 31464393f6579fc589a0538c8ca139d6 +File: nestedDoWhileWithLongContinue.kt - ebf9f7fe33825318b5640523fa7c874c packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/jvmRecordDescriptorStructure.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/jvmRecordDescriptorStructure.antlrtree.txt index d36902a1d..6ee383693 100644 --- a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/jvmRecordDescriptorStructure.antlrtree.txt +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/jvmRecordDescriptorStructure.antlrtree.txt @@ -1,4 +1,4 @@ -File: jvmRecordDescriptorStructure.kt - fbb4ef7df617575b479c319e6fa0ce00 +File: jvmRecordDescriptorStructure.kt - bbaf115e6ef2e1c992b257830f8384e7 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/supertypesCheck.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/supertypesCheck.antlrtree.txt index f94176889..604e0e587 100644 --- a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/supertypesCheck.antlrtree.txt +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/supertypesCheck.antlrtree.txt @@ -1,4 +1,4 @@ -File: supertypesCheck.kt - 6f020761de74797a74f36cb74f1140fa +File: supertypesCheck.kt - 438511d863a435799eaf2d8ae7db94a5 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassImplementsCollection.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassImplementsCollection.antlrtree.txt index 4fe6ccc6e..9c6ad3b83 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassImplementsCollection.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassImplementsCollection.antlrtree.txt @@ -1,4 +1,4 @@ -File: valueClassImplementsCollection.kt - a046f70ca001da9216503d484da43a32 +File: valueClassImplementsCollection.kt - 5653d84e043453e9fab1edc6f726e27c NL("\n") NL("\n") NL("\n") From 456f88471eefaaf533dd1292fb30ae90e85394d2 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Wed, 26 Jul 2023 17:46:05 +0200 Subject: [PATCH 16/22] [1.9] Add changed grammar tests III --- ...IncDecOperatorsInExpectClass.antlrtree.txt | 4 +- .../ProjectionsInSupertypes.antlrtree.txt | 47 +- .../PropertyInitializers.antlrtree.txt | 97 ++- .../annotations/DanglingMixed.antlrtree.txt | 94 ++- .../reservedExpressionSyntax.antlrtree.txt | 134 +++- .../IsErasedUpcastToNonReified.antlrtree.txt | 444 ++++++++++++- .../arrayAccessSet.antlrtree.txt | 114 +++- .../invisibleClassObjects.b.antlrtree.txt | 66 +- .../argumentsOfAnnotation.antlrtree.txt | 598 +++++++++++++++++- .../inspection.antlrtree.txt | 6 +- .../openProperty.antlrtree.txt | 9 +- .../delegatedProperty/kt48546.antlrtree.txt | 5 +- .../kt48546Strict.antlrtree.txt | 467 +++++++++++++- .../delegation/kt48546.antlrtree.txt | 4 +- .../deprecatedConstructor.C.antlrtree.txt | 6 +- .../deprecatedConstructor.use.antlrtree.txt | 44 +- .../deprecatedSinceKotlin/error.antlrtree.txt | 4 +- ...sageFromDeprecatedAnnotation.antlrtree.txt | 4 +- .../enum/enumInheritance.test.antlrtree.txt | 34 +- ...erOrderCallMissingParameters.antlrtree.txt | 5 +- .../CheckJavaVisibility.k1.antlrtree.txt | 15 +- .../builderInference/kt51464.antlrtree.txt | 4 +- .../multiLambdaRestriction.antlrtree.txt | 4 +- .../capturedTypes.main.antlrtree.txt | 4 +- .../stubTypeReceiverRestriction.antlrtree.txt | 4 +- ...eReceiverRestrictionDisabled.antlrtree.txt | 4 +- ...leHasComplexIntersectionType.antlrtree.txt | 6 +- .../kt45461.antlrtree.txt | 6 +- .../kt45461_5.antlrtree.txt | 4 +- .../kt48765.antlrtree.txt | 6 +- .../kt48935_3.antlrtree.txt | 6 +- .../kt48935_4.antlrtree.txt | 6 +- .../kt49661.antlrtree.txt | 5 +- .../nullableEmptyIntersection.antlrtree.txt | 5 +- ...variantAndContravariantTypes.antlrtree.txt | 4 +- .../publishedApi.antlrtree.txt | 4 +- .../inline/publishedApi.antlrtree.txt | 5 +- ...dConstructsInsideInlineClass.antlrtree.txt | 483 +++++++++++++- .../fieldOverridesNothing.main.antlrtree.txt | 4 +- ...ierOnParameterInFunctionType.antlrtree.txt | 5 +- ...assWithAbstractMember.common.antlrtree.txt | 111 +++- .../nestedClasses.common.antlrtree.txt | 47 +- .../diagnostics/objects/Objects.antlrtree.txt | 42 +- .../invokeInFunctionClass.antlrtree.txt | 359 ++++++++++- ...ceiverPresenceErrorForInvoke.antlrtree.txt | 4 +- .../wrongNumberOfTypeArguments.antlrtree.txt | 14 +- .../variables/aliasing.antlrtree.txt | 414 +++++++++++- .../typealiasesAsConstructors.antlrtree.txt | 4 +- .../jvmRecord/irrelevantFields.antlrtree.txt | 4 +- ...umentsInTypeAliasConstructor.antlrtree.txt | 16 +- .../lateinitValueClasses.antlrtree.txt | 4 +- ...sWithForbiddenUnderlyingType.antlrtree.txt | 4 +- ...ddenUnderlyingTypeMultiField.antlrtree.txt | 159 +++-- 53 files changed, 3824 insertions(+), 128 deletions(-) diff --git a/grammar/testData/diagnostics/IncDecOperatorsInExpectClass.antlrtree.txt b/grammar/testData/diagnostics/IncDecOperatorsInExpectClass.antlrtree.txt index fa8eefd45..efed8b777 100644 --- a/grammar/testData/diagnostics/IncDecOperatorsInExpectClass.antlrtree.txt +++ b/grammar/testData/diagnostics/IncDecOperatorsInExpectClass.antlrtree.txt @@ -1,4 +1,6 @@ -File: IncDecOperatorsInExpectClass.kt - 86ed0786f34169fa02cca24ae5e4970f +File: IncDecOperatorsInExpectClass.kt - e344413571d82384a6a0eafbf202f52a + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/ProjectionsInSupertypes.antlrtree.txt b/grammar/testData/diagnostics/ProjectionsInSupertypes.antlrtree.txt index 1a2245fcb..364e30460 100644 --- a/grammar/testData/diagnostics/ProjectionsInSupertypes.antlrtree.txt +++ b/grammar/testData/diagnostics/ProjectionsInSupertypes.antlrtree.txt @@ -1,4 +1,4 @@ -File: ProjectionsInSupertypes.kt - 76ab4ed8a3b89232c7304883f212469b (WITH_ERRORS) +File: ProjectionsInSupertypes.kt - 8c0a673d87d245615e7159c0689928dc (WITH_ERRORS) NL("\n") packageHeader importList @@ -155,4 +155,49 @@ File: ProjectionsInSupertypes.kt - 76ab4ed8a3b89232c7304883f212469b (WITH_ERRORS LCURL("{") classMemberDeclarations RCURL("}") + semis + NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("x") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("A") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") EOF("") diff --git a/grammar/testData/diagnostics/PropertyInitializers.antlrtree.txt b/grammar/testData/diagnostics/PropertyInitializers.antlrtree.txt index 1bddf4414..da4f146cd 100644 --- a/grammar/testData/diagnostics/PropertyInitializers.antlrtree.txt +++ b/grammar/testData/diagnostics/PropertyInitializers.antlrtree.txt @@ -1,4 +1,5 @@ -File: PropertyInitializers.kt - 824ed65ca447d967a3b0c8e011a963ba +File: PropertyInitializers.kt - 0eb8878e3174e8a09885692dfa65c84b + NL("\n") NL("\n") packageHeader importList @@ -158,5 +159,99 @@ File: PropertyInitializers.kt - 824ed65ca447d967a3b0c8e011a963ba Identifier("b") semis NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("map") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Map") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("mapOf") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + simpleIdentifier + Identifier("to") + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + lineStringContent + LineStrText("hello") + QUOTE_CLOSE(""") + RPAREN(")") + NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/annotations/DanglingMixed.antlrtree.txt b/grammar/testData/diagnostics/annotations/DanglingMixed.antlrtree.txt index cf788d92b..f7e7ceaef 100644 --- a/grammar/testData/diagnostics/annotations/DanglingMixed.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/DanglingMixed.antlrtree.txt @@ -1,4 +1,5 @@ -File: DanglingMixed.kt - 438ae5d82b66e9e2e39b0d7ac549246c (WITH_ERRORS) +File: DanglingMixed.kt - 44a6b9833afe762d1a000705cd927e38 (WITH_ERRORS) + NL("\n") packageHeader importList topLevelObject @@ -25,6 +26,17 @@ File: DanglingMixed.kt - 438ae5d82b66e9e2e39b0d7ac549246c (WITH_ERRORS) Identifier("Ann2") semis NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis NL("\n") topLevelObject declaration @@ -96,6 +108,86 @@ File: DanglingMixed.kt - 438ae5d82b66e9e2e39b0d7ac549246c (WITH_ERRORS) NL("\n") RCURL("}") NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + LCURL("{") + semis + NL("\n") + topLevelObject + declaration + topLevelObject + declaration + AT_PRE_WS(" @") + Identifier("Ann0") + semis + NL("\n") + topLevelObject + declaration + topLevelObject + declaration + AT_PRE_WS(" @") + Identifier("Ann") + topLevelObject + declaration + topLevelObject + declaration + AT_PRE_WS(" @") + Identifier("Ann3") + semis + NL("\n") + topLevelObject + declaration + topLevelObject + declaration + AT_PRE_WS(" @") + Identifier("Ann2") + LPAREN("(") + IntegerLiteral("1") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + topLevelObject + declaration + AT_PRE_WS(" @") + Identifier("Ann4") + semis + NL("\n") + RCURL("}") + NL("\n") RCURL("}") NL("\n") topLevelObject diff --git a/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax.antlrtree.txt b/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax.antlrtree.txt index 4f0fa7474..76e48220f 100644 --- a/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax.antlrtree.txt +++ b/grammar/testData/diagnostics/callableReference/bound/reservedExpressionSyntax.antlrtree.txt @@ -1,4 +1,4 @@ -File: reservedExpressionSyntax.kt - c054123555504f10adc3ee34ee2b365a (WITH_ERRORS) +File: reservedExpressionSyntax.kt - cf5e578b7ffbc725b9f8fab6fa7a0c17 (WITH_ERRORS) NL("\n") packageHeader PACKAGE("package") @@ -319,6 +319,79 @@ File: reservedExpressionSyntax.kt - c054123555504f10adc3ee34ee2b365a (WITH_ERROR LPAREN("(") RPAREN(")") COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + simpleIdentifier + Identifier("foo") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("testCallable1a") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") type functionType functionTypeParameters @@ -661,6 +734,65 @@ File: reservedExpressionSyntax.kt - c054123555504f10adc3ee34ee2b365a (WITH_ERROR functionValueParameters LPAREN("(") RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + COLONCOLON("::") + CLASS("class") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + receiverType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + DOT(".") + simpleIdentifier + Identifier("testClassLiteral1a") + functionValueParameters + LPAREN("(") + RPAREN(")") functionBody ASSIGNMENT("=") expression diff --git a/grammar/testData/diagnostics/cast/IsErasedUpcastToNonReified.antlrtree.txt b/grammar/testData/diagnostics/cast/IsErasedUpcastToNonReified.antlrtree.txt index a3a107f6e..bf637161d 100644 --- a/grammar/testData/diagnostics/cast/IsErasedUpcastToNonReified.antlrtree.txt +++ b/grammar/testData/diagnostics/cast/IsErasedUpcastToNonReified.antlrtree.txt @@ -1,4 +1,4 @@ -File: IsErasedUpcastToNonReified.kt - 04276d2c646e127d57e47482c3ee6884 +File: IsErasedUpcastToNonReified.kt - 299ed3bb3fcc0bb2efb25d5c1dd552dd packageHeader importList topLevelObject @@ -411,6 +411,21 @@ File: IsErasedUpcastToNonReified.kt - 04276d2c646e127d57e47482c3ee6884 semis NL("\n") NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("Box") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") topLevelObject declaration functionDeclaration @@ -447,6 +462,18 @@ File: IsErasedUpcastToNonReified.kt - 04276d2c646e127d57e47482c3ee6884 Identifier("T") quest QUEST_NO_WS("?") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") RPAREN(")") functionBody block @@ -543,6 +570,419 @@ File: IsErasedUpcastToNonReified.kt - 04276d2c646e127d57e47482c3ee6884 QUEST_NO_WS("?") semis NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Box") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + asOperator + AS("as") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("List") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RANGLE(">") + semis + NL("\n") RCURL("}") semis NL("\n") @@ -692,4 +1132,6 @@ File: IsErasedUpcastToNonReified.kt - 04276d2c646e127d57e47482c3ee6884 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/checkArguments/arrayAccessSet.antlrtree.txt b/grammar/testData/diagnostics/checkArguments/arrayAccessSet.antlrtree.txt index fd4365efd..0a547e174 100644 --- a/grammar/testData/diagnostics/checkArguments/arrayAccessSet.antlrtree.txt +++ b/grammar/testData/diagnostics/checkArguments/arrayAccessSet.antlrtree.txt @@ -1,4 +1,4 @@ -File: arrayAccessSet.kt - 872d4882d8e35bb1c8314a29ae2c58f1 +File: arrayAccessSet.kt - 5f34fb5c430ea9e27001c9ba23c3be94 NL("\n") NL("\n") packageHeader @@ -359,6 +359,67 @@ File: arrayAccessSet.kt - 872d4882d8e35bb1c8314a29ae2c58f1 semis NL("\n") NL("\n") + topLevelObject + declaration + objectDeclaration + OBJECT("object") + simpleIdentifier + Identifier("W") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + functionModifier + OPERATOR("operator") + FUN("fun") + simpleIdentifier + SET("set") + functionValueParameters + LPAREN("(") + functionValueParameter + parameterModifiers + parameterModifier + VARARG("vararg") + parameter + simpleIdentifier + Identifier("va") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + functionValueParameter + parameter + simpleIdentifier + VALUE("value") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") topLevelObject declaration functionDeclaration @@ -784,6 +845,57 @@ File: arrayAccessSet.kt - 872d4882d8e35bb1c8314a29ae2c58f1 QUOTE_CLOSE(""") semis NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("W") + assignableSuffix + indexingSuffix + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + RSQUARE("]") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/classObjects/invisibleClassObjects.b.antlrtree.txt b/grammar/testData/diagnostics/classObjects/invisibleClassObjects.b.antlrtree.txt index ce4affe3c..1dd76517c 100644 --- a/grammar/testData/diagnostics/classObjects/invisibleClassObjects.b.antlrtree.txt +++ b/grammar/testData/diagnostics/classObjects/invisibleClassObjects.b.antlrtree.txt @@ -1,4 +1,4 @@ -File: invisibleClassObjects.b.kt - f1af7437dabff230f4bee22af4b06995 +File: invisibleClassObjects.b.kt - 98c3a4e5d4c8b37298221c5df382bd22 packageHeader PACKAGE("package") identifier @@ -18,6 +18,22 @@ File: invisibleClassObjects.b.kt - f1af7437dabff230f4bee22af4b06995 Identifier("A") semi NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("A") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("foo") + semi + NL("\n") importHeader IMPORT("import") identifier @@ -28,6 +44,22 @@ File: invisibleClassObjects.b.kt - f1af7437dabff230f4bee22af4b06995 Identifier("B") semi NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("B") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("bar") + semi + NL("\n") importHeader IMPORT("import") identifier @@ -38,6 +70,22 @@ File: invisibleClassObjects.b.kt - f1af7437dabff230f4bee22af4b06995 Identifier("C") semi NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("C") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("baz") + semi + NL("\n") importHeader IMPORT("import") identifier @@ -48,6 +96,22 @@ File: invisibleClassObjects.b.kt - f1af7437dabff230f4bee22af4b06995 Identifier("D") semi NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("a") + DOT(".") + simpleIdentifier + Identifier("D") + DOT(".") + simpleIdentifier + Identifier("Companion") + DOT(".") + simpleIdentifier + Identifier("quux") + semi + NL("\n") NL("\n") topLevelObject declaration diff --git a/grammar/testData/diagnostics/collectionLiterals/argumentsOfAnnotation.antlrtree.txt b/grammar/testData/diagnostics/collectionLiterals/argumentsOfAnnotation.antlrtree.txt index 2419fe341..8027aed46 100644 --- a/grammar/testData/diagnostics/collectionLiterals/argumentsOfAnnotation.antlrtree.txt +++ b/grammar/testData/diagnostics/collectionLiterals/argumentsOfAnnotation.antlrtree.txt @@ -1,4 +1,4 @@ -File: argumentsOfAnnotation.kt - b8da118d22c977e8544e51428007cac3 +File: argumentsOfAnnotation.kt - 62e15ca4a99466b308cde8a2a65312e4 packageHeader importList topLevelObject @@ -1185,4 +1185,600 @@ File: argumentsOfAnnotation.kt - b8da118d22c977e8544e51428007cac3 RCURL("}") semis NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + INTERFACE("interface") + simpleIdentifier + Identifier("I") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("C") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + semis + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Test1") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Test2") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T1") + COMMA(",") + typeParameter + simpleIdentifier + Identifier("T2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T1") + RANGLE(">") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Test1") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("I") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T2") + RANGLE(">") + RANGLE(">") + RPAREN(")") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("Repeatable") + modifier + classModifier + ANNOTATION("annotation") + CLASS("class") + simpleIdentifier + Identifier("Test3") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("x") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Array") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Test2") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + RANGLE(">") + RANGLE(">") + RPAREN(")") + semis + NL("\n") + topLevelObject + declaration + functionDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Test3") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Test2") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Test1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("40") + RPAREN(")") + RPAREN(")") + RSQUARE("]") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Test3") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Test2") + postfixUnarySuffix + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + COMMA(",") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("C") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RANGLE(">") + RANGLE(">") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Test1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("40") + RPAREN(")") + RPAREN(")") + RSQUARE("]") + RPAREN(")") + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("Test3") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + collectionLiteral + LSQUARE("[") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Test2") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("Test1") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("40") + RPAREN(")") + RPAREN(")") + RSQUARE("]") + RPAREN(")") + NL("\n") + FUN("fun") + simpleIdentifier + Identifier("test9") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/constructorConsistency/inspection.antlrtree.txt b/grammar/testData/diagnostics/constructorConsistency/inspection.antlrtree.txt index 5c18bb139..a1fd0c4ba 100644 --- a/grammar/testData/diagnostics/constructorConsistency/inspection.antlrtree.txt +++ b/grammar/testData/diagnostics/constructorConsistency/inspection.antlrtree.txt @@ -1,4 +1,4 @@ -File: inspection.kt - 50d7425543357fb360c48ccca258eb75 +File: inspection.kt - ab56007145936520def956b135e436a0 packageHeader importList topLevelObject @@ -563,7 +563,7 @@ File: inspection.kt - 50d7425543357fb360c48ccca258eb75 modifiers modifier inheritanceModifier - OPEN("open") + ABSTRACT("abstract") CLASS("class") simpleIdentifier Identifier("Third") @@ -577,7 +577,7 @@ File: inspection.kt - 50d7425543357fb360c48ccca258eb75 modifiers modifier inheritanceModifier - OPEN("open") + ABSTRACT("abstract") VAR("var") variableDeclaration simpleIdentifier diff --git a/grammar/testData/diagnostics/constructorConsistency/openProperty.antlrtree.txt b/grammar/testData/diagnostics/constructorConsistency/openProperty.antlrtree.txt index cf8740e1d..76bac1fdb 100644 --- a/grammar/testData/diagnostics/constructorConsistency/openProperty.antlrtree.txt +++ b/grammar/testData/diagnostics/constructorConsistency/openProperty.antlrtree.txt @@ -1,4 +1,4 @@ -File: openProperty.kt - 9366adc490e5036825ad6427b17aa7cc +File: openProperty.kt - fdc8d4888d60d392f5d4e648ef720ed2 packageHeader importList topLevelObject @@ -7,7 +7,7 @@ File: openProperty.kt - 9366adc490e5036825ad6427b17aa7cc modifiers modifier inheritanceModifier - OPEN("open") + ABSTRACT("abstract") CLASS("class") simpleIdentifier Identifier("Base") @@ -21,7 +21,7 @@ File: openProperty.kt - 9366adc490e5036825ad6427b17aa7cc modifiers modifier inheritanceModifier - OPEN("open") + ABSTRACT("abstract") VAR("var") variableDeclaration simpleIdentifier @@ -41,7 +41,7 @@ File: openProperty.kt - 9366adc490e5036825ad6427b17aa7cc modifiers modifier inheritanceModifier - OPEN("open") + ABSTRACT("abstract") VAR("var") variableDeclaration simpleIdentifier @@ -219,7 +219,6 @@ File: openProperty.kt - 9366adc490e5036825ad6427b17aa7cc Identifier("temp") semis NL("\n") - NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/delegatedProperty/kt48546.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/kt48546.antlrtree.txt index 4246803d8..3cd8966a8 100644 --- a/grammar/testData/diagnostics/delegatedProperty/kt48546.antlrtree.txt +++ b/grammar/testData/diagnostics/delegatedProperty/kt48546.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt48546.kt - b90fcf56700409966ac7910ac8bca9fc +File: kt48546.kt - 80881da695ce72ab21dd39e26d8cf144 + NL("\n") NL("\n") NL("\n") NL("\n") @@ -280,4 +281,6 @@ File: kt48546.kt - b90fcf56700409966ac7910ac8bca9fc RCURL("}") NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/delegatedProperty/kt48546Strict.antlrtree.txt b/grammar/testData/diagnostics/delegatedProperty/kt48546Strict.antlrtree.txt index 09a8def3c..39877e602 100644 --- a/grammar/testData/diagnostics/delegatedProperty/kt48546Strict.antlrtree.txt +++ b/grammar/testData/diagnostics/delegatedProperty/kt48546Strict.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt48546Strict.kt - a7a853fef944a472ac525d5e5072e45c +File: kt48546Strict.kt - ba8375809611cc047bf04be4b0afeb97 NL("\n") NL("\n") NL("\n") @@ -280,5 +280,470 @@ File: kt48546Strict.kt - a7a853fef944a472ac525d5e5072e45c NL("\n") RCURL("}") NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("intResult") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i1") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intResult") + assignmentAndOperator + ADD_ASSIGNMENT("+=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i1") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i2") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intResult") + assignmentAndOperator + SUB_ASSIGNMENT("-=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i2") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i3") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intResult") + assignmentAndOperator + MULT_ASSIGNMENT("*=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i3") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i4") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intResult") + assignmentAndOperator + DIV_ASSIGNMENT("/=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i4") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("i5") + propertyDelegate + BY("by") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("lazy") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + assignment + assignableExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("intResult") + assignmentAndOperator + MOD_ASSIGNMENT("%=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i5") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + semis + NL("\n") + RCURL("}") + NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/delegation/kt48546.antlrtree.txt b/grammar/testData/diagnostics/delegation/kt48546.antlrtree.txt index 20b2fee6c..ed9a3225f 100644 --- a/grammar/testData/diagnostics/delegation/kt48546.antlrtree.txt +++ b/grammar/testData/diagnostics/delegation/kt48546.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt48546.kt - 2a297a262f0e27d1eb5a30ffa3d4049f +File: kt48546.kt - d95dd5d75d439efaf57dd28911d2eaab NL("\n") NL("\n") packageHeader @@ -145,4 +145,6 @@ File: kt48546.kt - 2a297a262f0e27d1eb5a30ffa3d4049f RCURL("}") NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedConstructor.C.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedConstructor.C.antlrtree.txt index 766201fa1..2e95e803d 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedConstructor.C.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedConstructor.C.antlrtree.txt @@ -1,9 +1,13 @@ -File: deprecatedConstructor.C.kt - 67665900b3a8d0cc4b0c25c5a06db430 +File: deprecatedConstructor.C.kt - 9bd661e3f5dad749eb14fb220f93567b packageHeader importList topLevelObject declaration classDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") CLASS("class") simpleIdentifier Identifier("C") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedConstructor.use.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedConstructor.use.antlrtree.txt index 8c8abd7f0..e18bf2a75 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedConstructor.use.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedConstructor.use.antlrtree.txt @@ -1,6 +1,48 @@ -File: deprecatedConstructor.use.kt - 080c5b8ca785056b85b7e912a4a95957 +File: deprecatedConstructor.use.kt - 959d7b88e81b3303479aea9e44caee83 packageHeader importList + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("D") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("C") + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + NL("\n") topLevelObject declaration functionDeclaration diff --git a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/error.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/error.antlrtree.txt index 2b094773b..22fadafc6 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/error.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/error.antlrtree.txt @@ -1,4 +1,6 @@ -File: error.kt - 066ac3cdfbe9137d8a75771b933f2f95 +File: error.kt - 045ab9ba958618f2665108dc6676f7f5 + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/messageFromDeprecatedAnnotation.antlrtree.txt b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/messageFromDeprecatedAnnotation.antlrtree.txt index 63f3c4cb2..69775e707 100644 --- a/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/messageFromDeprecatedAnnotation.antlrtree.txt +++ b/grammar/testData/diagnostics/deprecated/deprecatedSinceKotlin/messageFromDeprecatedAnnotation.antlrtree.txt @@ -1,4 +1,6 @@ -File: messageFromDeprecatedAnnotation.kt - a1823a0d64b6908ed105aa67710b770e +File: messageFromDeprecatedAnnotation.kt - ed4e8efa36d2f33d8d98337a5ee632e8 + NL("\n") + NL("\n") packageHeader PACKAGE("package") identifier diff --git a/grammar/testData/diagnostics/enum/enumInheritance.test.antlrtree.txt b/grammar/testData/diagnostics/enum/enumInheritance.test.antlrtree.txt index 253c59a7d..dddb4c2fe 100644 --- a/grammar/testData/diagnostics/enum/enumInheritance.test.antlrtree.txt +++ b/grammar/testData/diagnostics/enum/enumInheritance.test.antlrtree.txt @@ -1,4 +1,4 @@ -File: enumInheritance.test.kt - 1d83eae1ee77a52655b0955f77d518c6 +File: enumInheritance.test.kt - 3d4ed5f15a5ee68928f9afe1dd43e9cc packageHeader importList topLevelObject @@ -61,6 +61,38 @@ File: enumInheritance.test.kt - 1d83eae1ee77a52655b0955f77d518c6 RCURL("}") semis NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + classModifier + ENUM("enum") + CLASS("class") + simpleIdentifier + Identifier("MyEnum2_1") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("MyTrait") + valueArguments + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + semis + NL("\n") topLevelObject declaration classDeclaration diff --git a/grammar/testData/diagnostics/functionLiterals/higherOrderCallMissingParameters.antlrtree.txt b/grammar/testData/diagnostics/functionLiterals/higherOrderCallMissingParameters.antlrtree.txt index b99500654..7eed556b2 100644 --- a/grammar/testData/diagnostics/functionLiterals/higherOrderCallMissingParameters.antlrtree.txt +++ b/grammar/testData/diagnostics/functionLiterals/higherOrderCallMissingParameters.antlrtree.txt @@ -1,4 +1,5 @@ -File: higherOrderCallMissingParameters.kt - 1c284db5ed628ac0eabf2b045b1376a1 +File: higherOrderCallMissingParameters.kt - 834319207ffa57f87fdd656a176e06de + NL("\n") NL("\n") NL("\n") packageHeader @@ -565,4 +566,6 @@ File: higherOrderCallMissingParameters.kt - 1c284db5ed628ac0eabf2b045b1376a1 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/imports/CheckJavaVisibility.k1.antlrtree.txt b/grammar/testData/diagnostics/imports/CheckJavaVisibility.k1.antlrtree.txt index a1f042c48..edda14d47 100644 --- a/grammar/testData/diagnostics/imports/CheckJavaVisibility.k1.antlrtree.txt +++ b/grammar/testData/diagnostics/imports/CheckJavaVisibility.k1.antlrtree.txt @@ -1,4 +1,4 @@ -File: CheckJavaVisibility.k1.kt - b4585c81636850f11411a28f418b8e22 +File: CheckJavaVisibility.k1.kt - c3a98ee3abd257c1c40dac98b47fbfa5 packageHeader PACKAGE("package") identifier @@ -57,6 +57,19 @@ File: CheckJavaVisibility.k1.kt - b4585c81636850f11411a28f418b8e22 Identifier("javaPackageLocal") semi NL("\n") + importHeader + IMPORT("import") + identifier + simpleIdentifier + Identifier("j") + DOT(".") + simpleIdentifier + Identifier("JavaPublic") + DOT(".") + simpleIdentifier + Identifier("javaProtected") + semi + NL("\n") NL("\n") importHeader IMPORT("import") diff --git a/grammar/testData/diagnostics/inference/builderInference/kt51464.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/kt51464.antlrtree.txt index 9fae49de3..59bdef69f 100644 --- a/grammar/testData/diagnostics/inference/builderInference/kt51464.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/kt51464.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt51464.kt - 944c84eced945971916f93d07ebec4e1 +File: kt51464.kt - dff405021935294bb2f46e73304e2831 NL("\n") packageHeader importList @@ -395,4 +395,6 @@ File: kt51464.kt - 944c84eced945971916f93d07ebec4e1 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestriction.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestriction.antlrtree.txt index 8e8342697..4df7a51f2 100644 --- a/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestriction.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/multiLambdaRestriction.antlrtree.txt @@ -1,4 +1,4 @@ -File: multiLambdaRestriction.kt - 4fbb8747fb952fa0f32bb92a2953abdc +File: multiLambdaRestriction.kt - b538121483b92b664fd74442472144b3 NL("\n") NL("\n") NL("\n") @@ -1851,4 +1851,6 @@ File: multiLambdaRestriction.kt - 4fbb8747fb952fa0f32bb92a2953abdc semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/builderInference/stubTypes/capturedTypes.main.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/stubTypes/capturedTypes.main.antlrtree.txt index 7421f59df..a54b01de7 100644 --- a/grammar/testData/diagnostics/inference/builderInference/stubTypes/capturedTypes.main.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/stubTypes/capturedTypes.main.antlrtree.txt @@ -1,4 +1,4 @@ -File: capturedTypes.main.kt - 13d6e41ac2026f18044ac9db7bb214cb +File: capturedTypes.main.kt - 5585ca4e554df3306068b65ded650283 packageHeader importList importHeader @@ -1096,4 +1096,6 @@ File: capturedTypes.main.kt - 13d6e41ac2026f18044ac9db7bb214cb semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestriction.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestriction.antlrtree.txt index 1085f18cf..e8c5eab67 100644 --- a/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestriction.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestriction.antlrtree.txt @@ -1,4 +1,4 @@ -File: stubTypeReceiverRestriction.kt - 8ec5b70b3bf321815851f31bd01a3669 +File: stubTypeReceiverRestriction.kt - 6c6ee40495bac7c675361fb2e96925dc NL("\n") NL("\n") NL("\n") @@ -1988,4 +1988,6 @@ File: stubTypeReceiverRestriction.kt - 8ec5b70b3bf321815851f31bd01a3669 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestrictionDisabled.antlrtree.txt b/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestrictionDisabled.antlrtree.txt index c50cb6397..98a1005bd 100644 --- a/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestrictionDisabled.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/builderInference/stubTypes/stubTypeReceiverRestrictionDisabled.antlrtree.txt @@ -1,4 +1,4 @@ -File: stubTypeReceiverRestrictionDisabled.kt - f67d396520ba9fd86b1e89275220501f +File: stubTypeReceiverRestrictionDisabled.kt - f9da9f902166108733788bd3336b7772 NL("\n") NL("\n") NL("\n") @@ -1989,4 +1989,6 @@ File: stubTypeReceiverRestrictionDisabled.kt - f67d396520ba9fd86b1e89275220501f semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.antlrtree.txt index 0037f9600..d377db729 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.antlrtree.txt @@ -1,4 +1,6 @@ -File: compatibilityResolveWhenVariableHasComplexIntersectionType.kt - 063f2b6068ffdc50cc29dcd2d2719702 +File: compatibilityResolveWhenVariableHasComplexIntersectionType.kt - 291187c3e66368ab7173dcf87250ce59 + NL("\n") + NL("\n") NL("\n") NL("\n") packageHeader @@ -924,4 +926,6 @@ File: compatibilityResolveWhenVariableHasComplexIntersectionType.kt - 063f2b6068 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461.antlrtree.txt index 35a182c87..f169c41e1 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt45461.kt - 6b6e0139e9e391e907939efec3c6a972 +File: kt45461.kt - c7bb36ffed7b855cac17c37a71b7ed8e + NL("\n") + NL("\n") NL("\n") packageHeader importList @@ -217,4 +219,6 @@ File: kt45461.kt - 6b6e0139e9e391e907939efec3c6a972 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_5.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_5.antlrtree.txt index 6bc1a4764..273973e3c 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_5.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt45461_5.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt45461_5.kt - c7b0aa0658069ec277b9049fffe79f5d +File: kt45461_5.kt - 2dff491c3c2c4415702d0705f61c452c + NL("\n") + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48765.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48765.antlrtree.txt index 01c4ce3cc..5397179a9 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48765.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48765.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt48765.kt - c7d84e098598be84ef2e97173b1f478c +File: kt48765.kt - d4efa391fd96ae7681c8f7c2b79c687d + NL("\n") + NL("\n") NL("\n") packageHeader importList @@ -501,4 +503,6 @@ File: kt48765.kt - c7d84e098598be84ef2e97173b1f478c semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_3.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_3.antlrtree.txt index 78bb13c81..13a76098e 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_3.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_3.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt48935_3.kt - b78163af9656863b84f90b21e5b22dec +File: kt48935_3.kt - 90322b8540d25fb6fa4d0735a7d2ea31 + NL("\n") + NL("\n") packageHeader importList topLevelObject @@ -211,4 +213,6 @@ File: kt48935_3.kt - b78163af9656863b84f90b21e5b22dec semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_4.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_4.antlrtree.txt index 20163606f..10a156573 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_4.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt48935_4.antlrtree.txt @@ -1,4 +1,6 @@ -File: kt48935_4.kt - 771df9ade4d86816cb0f5d4e5d6db41e +File: kt48935_4.kt - 7ee78984cdeca87eb6a2d42b519707e4 + NL("\n") + NL("\n") packageHeader importList topLevelObject @@ -207,4 +209,6 @@ File: kt48935_4.kt - 771df9ade4d86816cb0f5d4e5d6db41e semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt49661.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt49661.antlrtree.txt index 3a20a1ba2..994daf429 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt49661.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/kt49661.antlrtree.txt @@ -1,4 +1,5 @@ -File: kt49661.kt - b05948d9c19ac524fc22c4658f08bcbd +File: kt49661.kt - 5113cc282cc810977e16d699b8289909 + NL("\n") NL("\n") packageHeader importList @@ -257,4 +258,6 @@ File: kt49661.kt - b05948d9c19ac524fc22c4658f08bcbd semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/nullableEmptyIntersection.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/nullableEmptyIntersection.antlrtree.txt index 952a7832f..b564a8b98 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/nullableEmptyIntersection.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/nullableEmptyIntersection.antlrtree.txt @@ -1,4 +1,5 @@ -File: nullableEmptyIntersection.kt - 51b71313383726bc344959bb732d8cd5 +File: nullableEmptyIntersection.kt - 7da20b6a4adc136094e3948429f7b345 + NL("\n") packageHeader importList topLevelObject @@ -207,4 +208,6 @@ File: nullableEmptyIntersection.kt - 51b71313383726bc344959bb732d8cd5 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.antlrtree.txt b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.antlrtree.txt index 8a304f4f5..f15a30ecb 100644 --- a/grammar/testData/diagnostics/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.antlrtree.txt +++ b/grammar/testData/diagnostics/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.antlrtree.txt @@ -1,4 +1,6 @@ -File: selectFromCovariantAndContravariantTypes.kt - b5200ea31a5d2ca7468fae6a34635655 +File: selectFromCovariantAndContravariantTypes.kt - 3386d0968d9166dce2535a96a734f83d + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/publishedApi.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/publishedApi.antlrtree.txt index 07fbb7d8b..9eb21bbd1 100644 --- a/grammar/testData/diagnostics/inline/nonPublicMember/publishedApi.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonPublicMember/publishedApi.antlrtree.txt @@ -1,4 +1,6 @@ -File: publishedApi.kt - 512aadee77628519d03092a9b42d9350 +File: publishedApi.kt - 1fa70c8fac1265764ae0b3a53fef3bb9 + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/inline/publishedApi.antlrtree.txt b/grammar/testData/diagnostics/inline/publishedApi.antlrtree.txt index c33c55d52..9e02755b8 100644 --- a/grammar/testData/diagnostics/inline/publishedApi.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/publishedApi.antlrtree.txt @@ -1,4 +1,7 @@ -File: publishedApi.kt - c5d310de3f0534a160e664ad76def540 +File: publishedApi.kt - 1b423f18b9d534709869a3e6b6a76717 + NL("\n") + NL("\n") + NL("\n") NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/inlineClasses/reservedMembersAndConstructsInsideInlineClass.antlrtree.txt b/grammar/testData/diagnostics/inlineClasses/reservedMembersAndConstructsInsideInlineClass.antlrtree.txt index b571b0d42..88354c82c 100644 --- a/grammar/testData/diagnostics/inlineClasses/reservedMembersAndConstructsInsideInlineClass.antlrtree.txt +++ b/grammar/testData/diagnostics/inlineClasses/reservedMembersAndConstructsInsideInlineClass.antlrtree.txt @@ -1,4 +1,5 @@ -File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c05051a27cc3f +File: reservedMembersAndConstructsInsideInlineClass.kt - 3841c358d83b149de68c70036d0a30cf + NL("\n") NL("\n") NL("\n") NL("\n") @@ -8,9 +9,18 @@ File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c050 declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier - functionModifier - INLINE("inline") + classModifier + VALUE("value") CLASS("class") simpleIdentifier Identifier("IC1") @@ -222,14 +232,22 @@ File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c050 RCURL("}") semis NL("\n") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier - functionModifier - INLINE("inline") + classModifier + VALUE("value") CLASS("class") simpleIdentifier Identifier("IC2") @@ -507,14 +525,22 @@ File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c050 RCURL("}") semis NL("\n") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier - functionModifier - INLINE("inline") + classModifier + VALUE("value") CLASS("class") simpleIdentifier Identifier("IC3") @@ -719,14 +745,22 @@ File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c050 RCURL("}") semis NL("\n") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier - functionModifier - INLINE("inline") + classModifier + VALUE("value") CLASS("class") simpleIdentifier Identifier("IC4") @@ -804,14 +838,22 @@ File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c050 RCURL("}") semis NL("\n") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier - functionModifier - INLINE("inline") + classModifier + VALUE("value") CLASS("class") simpleIdentifier Identifier("IC5") @@ -944,4 +986,415 @@ File: reservedMembersAndConstructsInsideInlineClass.kt - 136cceb54a62ca73cf4c050 semis NL("\n") RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC6") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC6") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC7") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC7") + typeArguments + LANGLE("<") + typeProjection + MULT("*") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC8") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC8") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("T") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") + modifier + classModifier + VALUE("value") + CLASS("class") + simpleIdentifier + Identifier("IC9") + typeParameters + LANGLE("<") + typeParameter + simpleIdentifier + Identifier("T") + RANGLE(">") + primaryConstructor + classParameters + LPAREN("(") + classParameter + VAL("val") + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("equals") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("other") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("IC9") + typeArguments + LANGLE("<") + typeProjection + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RANGLE(">") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Boolean") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + BooleanLiteral("true") + semis + NL("\n") + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/j+k/fieldOverridesNothing.main.antlrtree.txt b/grammar/testData/diagnostics/j+k/fieldOverridesNothing.main.antlrtree.txt index cfd9349b1..2e87d2a0c 100644 --- a/grammar/testData/diagnostics/j+k/fieldOverridesNothing.main.antlrtree.txt +++ b/grammar/testData/diagnostics/j+k/fieldOverridesNothing.main.antlrtree.txt @@ -1,4 +1,4 @@ -File: fieldOverridesNothing.main.kt - d1d8df6157f738aa2d27fc2ac83a778b +File: fieldOverridesNothing.main.kt - 80588e8e0ec8a8f7b616c08501035be6 packageHeader importList topLevelObject @@ -147,4 +147,6 @@ File: fieldOverridesNothing.main.kt - d1d8df6157f738aa2d27fc2ac83a778b semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/modifiers/modifierOnParameterInFunctionType.antlrtree.txt b/grammar/testData/diagnostics/modifiers/modifierOnParameterInFunctionType.antlrtree.txt index 46d00a3a8..12d8a8452 100644 --- a/grammar/testData/diagnostics/modifiers/modifierOnParameterInFunctionType.antlrtree.txt +++ b/grammar/testData/diagnostics/modifiers/modifierOnParameterInFunctionType.antlrtree.txt @@ -1,4 +1,5 @@ -File: modifierOnParameterInFunctionType.kt - 9bd7bc3dbaef0f13bb23ab2cdcbd6f2f (WITH_ERRORS) +File: modifierOnParameterInFunctionType.kt - e00776f2649390c3620895d6314b2c91 (WITH_ERRORS) + NL("\n") NL("\n") NL("\n") packageHeader @@ -460,4 +461,6 @@ File: modifierOnParameterInFunctionType.kt - 9bd7bc3dbaef0f13bb23ab2cdcbd6f2f (W ASSIGNMENT("=") LCURL("{") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/extendExpectedClassWithAbstractMember.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/extendExpectedClassWithAbstractMember.common.antlrtree.txt index ceb733501..5532ae44c 100644 --- a/grammar/testData/diagnostics/multiplatform/headerClass/extendExpectedClassWithAbstractMember.common.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/headerClass/extendExpectedClassWithAbstractMember.common.antlrtree.txt @@ -1,4 +1,4 @@ -File: extendExpectedClassWithAbstractMember.common.kt - cd28773bd35367288c96df2f2ffb1abf +File: extendExpectedClassWithAbstractMember.common.kt - 8c7f510aa5a0787c422c9f9077a04a8c packageHeader importList topLevelObject @@ -718,4 +718,113 @@ File: extendExpectedClassWithAbstractMember.common.kt - cd28773bd35367288c96df2f Identifier("BaseF") semis NL("\n") + NL("\n") + NL("\n") + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + ABSTRACT("abstract") + CLASS("class") + simpleIdentifier + Identifier("BaseG") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + modifiers + modifier + platformModifier + EXPECT("expect") + modifier + inheritanceModifier + OPEN("open") + CLASS("class") + simpleIdentifier + Identifier("BaseGImpl") + primaryConstructor + classParameters + LPAREN("(") + RPAREN(")") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("BaseG") + classBody + LCURL("{") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + FUN("fun") + simpleIdentifier + Identifier("foo") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + topLevelObject + declaration + classDeclaration + CLASS("class") + simpleIdentifier + Identifier("DerivedG1") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + constructorInvocation + userType + simpleUserType + simpleIdentifier + Identifier("BaseGImpl") + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/headerClass/nestedClasses.common.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/headerClass/nestedClasses.common.antlrtree.txt index 8176c0534..b18786613 100644 --- a/grammar/testData/diagnostics/multiplatform/headerClass/nestedClasses.common.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/headerClass/nestedClasses.common.antlrtree.txt @@ -1,4 +1,4 @@ -File: nestedClasses.common.kt - add33765f4695249a21f0e9506508ade +File: nestedClasses.common.kt - 54d1f8e5f8b2fe5942cfe35b443503e5 packageHeader importList importHeader @@ -91,6 +91,7 @@ File: nestedClasses.common.kt - add33765f4695249a21f0e9506508ade RPAREN(")") semis NL("\n") + NL("\n") topLevelObject declaration classDeclaration @@ -496,5 +497,49 @@ File: nestedClasses.common.kt - add33765f4695249a21f0e9506508ade semis NL("\n") NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("TODO") + functionValueParameters + LPAREN("(") + RPAREN(")") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Nothing") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + postfixUnarySuffix + postfixUnaryOperator + EXCL_NO_WS("!") + excl + EXCL_NO_WS("!") + semis + NL("\n") + NL("\n") NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/objects/Objects.antlrtree.txt b/grammar/testData/diagnostics/objects/Objects.antlrtree.txt index d527311d1..ebc582cba 100644 --- a/grammar/testData/diagnostics/objects/Objects.antlrtree.txt +++ b/grammar/testData/diagnostics/objects/Objects.antlrtree.txt @@ -1,4 +1,4 @@ -File: Objects.kt - 0d08c8f90e010c1aa2acbea0052775ba +File: Objects.kt - 4401f7c7880e15dd6bfc45c88e7ec542 NL("\n") packageHeader PACKAGE("package") @@ -259,6 +259,46 @@ File: Objects.kt - 0d08c8f90e010c1aa2acbea0052775ba semis NL("\n") NL("\n") + topLevelObject + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + objectLiteral + OBJECT("object") + COLON(":") + delegationSpecifiers + annotatedDelegationSpecifier + delegationSpecifier + userType + simpleUserType + simpleIdentifier + Identifier("Foo") + classBody + LCURL("{") + classMemberDeclarations + RCURL("}") + NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration diff --git a/grammar/testData/diagnostics/override/parameterNames/invokeInFunctionClass.antlrtree.txt b/grammar/testData/diagnostics/override/parameterNames/invokeInFunctionClass.antlrtree.txt index 6da181b60..8157f74fc 100644 --- a/grammar/testData/diagnostics/override/parameterNames/invokeInFunctionClass.antlrtree.txt +++ b/grammar/testData/diagnostics/override/parameterNames/invokeInFunctionClass.antlrtree.txt @@ -1,4 +1,4 @@ -File: invokeInFunctionClass.kt - eec635bce1521701df34790f61cc8cd4 +File: invokeInFunctionClass.kt - d99dbb87a18d98620e80c2047f7d066c packageHeader importList topLevelObject @@ -979,4 +979,361 @@ File: invokeInFunctionClass.kt - eec635bce1521701df34790f61cc8cd4 RCURL("}") semis NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test4") + functionValueParameters + LPAREN("(") + functionValueParameter + parameter + simpleIdentifier + Identifier("f") + COLON(":") + type + functionType + functionTypeParameters + LPAREN("(") + parameter + simpleIdentifier + Identifier("myParamName") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + ARROW("->") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Unit") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("p0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("myParamName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("p0") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("f") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("invoke") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + valueArgument + simpleIdentifier + Identifier("myParamName") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/resolve/invoke/errors/receiverPresenceErrorForInvoke.antlrtree.txt b/grammar/testData/diagnostics/resolve/invoke/errors/receiverPresenceErrorForInvoke.antlrtree.txt index d8d790dfb..c0dd415ee 100644 --- a/grammar/testData/diagnostics/resolve/invoke/errors/receiverPresenceErrorForInvoke.antlrtree.txt +++ b/grammar/testData/diagnostics/resolve/invoke/errors/receiverPresenceErrorForInvoke.antlrtree.txt @@ -1,4 +1,4 @@ -File: receiverPresenceErrorForInvoke.kt - ecad15fb8afca05a6a310452d9b853c1 +File: receiverPresenceErrorForInvoke.kt - 426afbd1f2773fa4415fc8a011242cf8 packageHeader importList topLevelObject @@ -275,4 +275,6 @@ File: receiverPresenceErrorForInvoke.kt - ecad15fb8afca05a6a310452d9b853c1 semis NL("\n") RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/resolve/wrongNumberOfTypeArguments.antlrtree.txt b/grammar/testData/diagnostics/resolve/wrongNumberOfTypeArguments.antlrtree.txt index 898d8912a..edf9d345d 100644 --- a/grammar/testData/diagnostics/resolve/wrongNumberOfTypeArguments.antlrtree.txt +++ b/grammar/testData/diagnostics/resolve/wrongNumberOfTypeArguments.antlrtree.txt @@ -1,4 +1,4 @@ -File: wrongNumberOfTypeArguments.kt - 691f1051d60220d2b1f575366a03f4e8 +File: wrongNumberOfTypeArguments.kt - e447b5254066b2b4e99b72d04effd5a0 NL("\n") NL("\n") packageHeader @@ -125,10 +125,8 @@ File: wrongNumberOfTypeArguments.kt - 691f1051d60220d2b1f575366a03f4e8 prefixUnaryExpression postfixUnaryExpression primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") + literalConstant + IntegerLiteral("0") RPAREN(")") semis NL("\n") @@ -252,10 +250,8 @@ File: wrongNumberOfTypeArguments.kt - 691f1051d60220d2b1f575366a03f4e8 prefixUnaryExpression postfixUnaryExpression primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") + literalConstant + IntegerLiteral("0") COMMA(",") valueArgument expression diff --git a/grammar/testData/diagnostics/smartCasts/variables/aliasing.antlrtree.txt b/grammar/testData/diagnostics/smartCasts/variables/aliasing.antlrtree.txt index 7ae709177..aac706501 100644 --- a/grammar/testData/diagnostics/smartCasts/variables/aliasing.antlrtree.txt +++ b/grammar/testData/diagnostics/smartCasts/variables/aliasing.antlrtree.txt @@ -1,4 +1,6 @@ -File: aliasing.kt - 838db4764b6f709a5f9dfe85bd46eab5 +File: aliasing.kt - 701f21406d8d3afca126a3f8cd71cdd9 + NL("\n") + NL("\n") packageHeader importList topLevelObject @@ -1553,4 +1555,414 @@ File: aliasing.kt - 838db4764b6f709a5f9dfe85bd46eab5 RCURL("}") semis NL("\n") + NL("\n") + topLevelObject + declaration + functionDeclaration + FUN("fun") + simpleIdentifier + Identifier("test3") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + nullableType + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Any") + quest + QUEST_WS("? ") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("b") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("c") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + NullLiteral("null") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + ifExpression + IF("if") + LPAREN("(") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + isOperator + IS("is") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("String") + RPAREN(")") + controlStructureBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("b") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("c") + postfixUnarySuffix + navigationSuffix + memberAccessOperator + DOT(".") + simpleIdentifier + Identifier("length") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/sourceCompatibility/apiVersion/typealiasesAsConstructors.antlrtree.txt b/grammar/testData/diagnostics/sourceCompatibility/apiVersion/typealiasesAsConstructors.antlrtree.txt index 49746cbb1..ffa120977 100644 --- a/grammar/testData/diagnostics/sourceCompatibility/apiVersion/typealiasesAsConstructors.antlrtree.txt +++ b/grammar/testData/diagnostics/sourceCompatibility/apiVersion/typealiasesAsConstructors.antlrtree.txt @@ -1,4 +1,4 @@ -File: typealiasesAsConstructors.kt - ef0ad59d65a0a739a59d14514b56e44d +File: typealiasesAsConstructors.kt - b420fc61dfdf3eeb889e9857837ac672 NL("\n") packageHeader importList @@ -289,4 +289,6 @@ File: typealiasesAsConstructors.kt - ef0ad59d65a0a739a59d14514b56e44d valueArguments LPAREN("(") RPAREN(")") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/irrelevantFields.antlrtree.txt b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/irrelevantFields.antlrtree.txt index 569158efd..cb4b14c86 100644 --- a/grammar/testData/diagnostics/testsWithJava17/jvmRecord/irrelevantFields.antlrtree.txt +++ b/grammar/testData/diagnostics/testsWithJava17/jvmRecord/irrelevantFields.antlrtree.txt @@ -1,4 +1,6 @@ -File: irrelevantFields.kt - f1bfa8d3568d0cded2756890b53f4bed +File: irrelevantFields.kt - 0fe999d5f890ba2450af9e642d404d7f + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.antlrtree.txt b/grammar/testData/diagnostics/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.antlrtree.txt index b243ce304..5692f47e9 100644 --- a/grammar/testData/diagnostics/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.antlrtree.txt +++ b/grammar/testData/diagnostics/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.antlrtree.txt @@ -1,4 +1,4 @@ -File: wrongNumberOfArgumentsInTypeAliasConstructor.kt - fba47c944443c565a4f559f93f978860 +File: wrongNumberOfArgumentsInTypeAliasConstructor.kt - 23cf478efa7f2806f6fdf6e228b987bb NL("\n") NL("\n") packageHeader @@ -1065,8 +1065,10 @@ File: wrongNumberOfArgumentsInTypeAliasConstructor.kt - fba47c944443c565a4f559f9 prefixUnaryExpression postfixUnaryExpression primaryExpression - literalConstant - IntegerLiteral("1") + stringLiteral + lineStringLiteral + QUOTE_OPEN(""") + QUOTE_CLOSE(""") COMMA(",") valueArgument expression @@ -1085,10 +1087,8 @@ File: wrongNumberOfArgumentsInTypeAliasConstructor.kt - fba47c944443c565a4f559f9 prefixUnaryExpression postfixUnaryExpression primaryExpression - stringLiteral - lineStringLiteral - QUOTE_OPEN(""") - QUOTE_CLOSE(""") + literalConstant + IntegerLiteral("1") RPAREN(")") NL("\n") topLevelObject @@ -1300,7 +1300,7 @@ File: wrongNumberOfArgumentsInTypeAliasConstructor.kt - fba47c944443c565a4f559f9 postfixUnaryExpression primaryExpression simpleIdentifier - Identifier("P2") + Identifier("PR") postfixUnarySuffix typeArguments LANGLE("<") diff --git a/grammar/testData/diagnostics/valueClasses/lateinitValueClasses.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/lateinitValueClasses.antlrtree.txt index c1c2be6f3..3bc7d0061 100644 --- a/grammar/testData/diagnostics/valueClasses/lateinitValueClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/lateinitValueClasses.antlrtree.txt @@ -1,4 +1,6 @@ -File: lateinitValueClasses.kt - 74e13fd0d23c49e5ab7380b540087f62 +File: lateinitValueClasses.kt - ff5d1681945853a74d549f0bee42559c + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingType.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingType.antlrtree.txt index 128f633a5..d1f40491e 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingType.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingType.antlrtree.txt @@ -1,4 +1,6 @@ -File: valueClassWithForbiddenUnderlyingType.kt - 8a8b6a39ffb62411572e0dc5686cd065 +File: valueClassWithForbiddenUnderlyingType.kt - 4ca0af03f241bba56f65b4080452cb24 + NL("\n") + NL("\n") NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt index 2aab5416d..f8843dd45 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt @@ -1,18 +1,23 @@ -File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548091c275f73a (WITH_ERRORS) +File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - 55d9cabe504d9d8a5cf0924c17bd3c8b (WITH_ERRORS) NL("\n") NL("\n") NL("\n") NL("\n") - NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") packageHeader importList topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -32,13 +37,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -80,13 +91,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -135,13 +152,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -203,13 +226,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -292,13 +321,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -344,13 +379,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -417,13 +458,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -459,13 +506,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -508,13 +561,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 semis NL("\n") NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -550,13 +609,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -592,13 +657,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") @@ -634,13 +705,19 @@ File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - e9b7d78a4ca22f934a548 RPAREN(")") semis NL("\n") - NL("\n") - Identifier("OPTIONAL_JVM_INLINE_ANNOTATION") - NL("\n") topLevelObject declaration classDeclaration modifiers + annotation + singleAnnotation + AT_PRE_WS("\n@") + unescapedAnnotation + userType + simpleUserType + simpleIdentifier + Identifier("JvmInline") + NL("\n") modifier classModifier VALUE("value") From 616292964a7ebb8e06bbef635f71edeb39aae198 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Wed, 26 Jul 2023 17:49:15 +0200 Subject: [PATCH 17/22] [grammar] Update the utility scripts --- grammar/scripts/processModified.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar/scripts/processModified.sh b/grammar/scripts/processModified.sh index e1420e8f9..613173752 100755 --- a/grammar/scripts/processModified.sh +++ b/grammar/scripts/processModified.sh @@ -2,7 +2,7 @@ REF="$1" -for i in `git status -s | grep "^M.*\.antlrtree.txt$" | cut -d ' ' -f 3`; do +for i in `git status -s | grep "^ M.*\.antlrtree.txt$" | cut -d ' ' -f 3`; do git diff --numstat HEAD $i | grep -q "$REF"; if [[ $? == 0 ]]; then echo $i; From 419ceb0b6608720808e744d1dc82c8f3766efbb0 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Thu, 27 Jul 2023 19:44:00 +0200 Subject: [PATCH 18/22] [grammar] Fix grammar files * Allow suspend anonymous functions * Fix parsing of val/var getter/setters --- grammar/src/main/antlr/KotlinParser.g4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grammar/src/main/antlr/KotlinParser.g4 b/grammar/src/main/antlr/KotlinParser.g4 index 06c7ac18c..0364bebc6 100644 --- a/grammar/src/main/antlr/KotlinParser.g4 +++ b/grammar/src/main/antlr/KotlinParser.g4 @@ -183,7 +183,7 @@ propertyDeclaration (NL* (multiVariableDeclaration | variableDeclaration)) (NL* typeConstraints)? (NL* (ASSIGNMENT NL* expression | propertyDelegate))? - (NL+ SEMICOLON)? NL* (getter? (NL* semi? setter)? | setter? (NL* semi? getter)?) + (NL* SEMICOLON)? NL* (getter? (NL* semi? setter)? | setter? (NL* semi? getter)?) ; propertyDelegate @@ -582,7 +582,9 @@ lambdaParameter ; anonymousFunction - : FUN + : SUSPEND? + NL* + FUN (NL* type NL* DOT)? NL* parametersWithOptionalType (NL* COLON NL* type)? From cb5d39eaf09eaf8d3f5f3a87d8c99b7f75eb1b71 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Fri, 28 Jul 2023 10:39:04 +0200 Subject: [PATCH 19/22] [grammar] Fix typo in utility script --- grammar/scripts/compareActuals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar/scripts/compareActuals.sh b/grammar/scripts/compareActuals.sh index 982f81a5a..66cfdeeeb 100755 --- a/grammar/scripts/compareActuals.sh +++ b/grammar/scripts/compareActuals.sh @@ -3,7 +3,7 @@ TEST_DATA="$1" for fo in `find ${TEST_DATA} -name "*.antlrtree.txt"`; do - fa="$i.actual"; + fa="$fo.actual"; if [[ -e $fa ]]; then meld $fa $fo; fi From a94315649ae44453d6e0a639d4de1a586c8176e2 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Fri, 28 Jul 2023 10:43:19 +0200 Subject: [PATCH 20/22] [grammar] Fix `constructorInvocation` to allow NLs between the ctor type and ctor parameters --- grammar/src/main/antlr/KotlinParser.g4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar/src/main/antlr/KotlinParser.g4 b/grammar/src/main/antlr/KotlinParser.g4 index 0364bebc6..a0335df4b 100644 --- a/grammar/src/main/antlr/KotlinParser.g4 +++ b/grammar/src/main/antlr/KotlinParser.g4 @@ -95,7 +95,7 @@ delegationSpecifier ; constructorInvocation - : userType valueArguments + : userType NL* valueArguments ; annotatedDelegationSpecifier From 9ada323249a3ffe992652acec5b0b2a5713c1cf3 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Fri, 28 Jul 2023 10:51:11 +0200 Subject: [PATCH 21/22] [1.9] Add fixed grammar tests --- .../diagnostics/Abstract.b.antlrtree.txt | 72 +- .../AbstractInAbstractClass.antlrtree.txt | 2350 ++-- .../diagnostics/AbstractInClass.antlrtree.txt | 2391 ++-- .../diagnostics/AbstractInTrait.antlrtree.txt | 2391 ++-- .../diagnostics/StringTemplates.antlrtree.txt | 2 +- .../diagnostics/TypeInference.antlrtree.txt | 4 +- ...chOnOverrideWithSyntaxErrors.antlrtree.txt | 5 +- .../diagnostics/UnusedVariables.antlrtree.txt | 2 +- .../AnnotatedConstructorParams.antlrtree.txt | 5 +- .../ValDeferredInitInFinalClass.antlrtree.txt | 54 +- ...dInitInOpenClassOpenValError.antlrtree.txt | 54 +- ...nitInOpenClassOpenValWarning.antlrtree.txt | 54 +- .../VarDeferredInitInFinalClass.antlrtree.txt | 10124 +++++++++------- .../VarDeferredInitInOpenClass.antlrtree.txt | 10120 ++++++++------- .../cfgOfFullyIncorrectCode.antlrtree.txt | 2 +- .../controlFlowAnalysis/kt2330.antlrtree.txt | 12 +- .../controlFlowAnalysis/kt2845.antlrtree.txt | 2 +- .../improperElseInExpression.antlrtree.txt | 4 +- .../whenWithNoSubjectAndCommas.antlrtree.txt | 2 +- .../DataFlowInfoInMultiDecl.antlrtree.txt | 10 +- .../RedeclarationsInMultiDecl.antlrtree.txt | 7 +- .../enum/AbstractInEnum.antlrtree.txt | 66 +- ...ntextReceiversOnValueClasses.antlrtree.txt | 2 +- .../twoReceiverCandidatesError.antlrtree.txt | 2 +- .../functionLiteralInIf.antlrtree.txt | 2 +- .../incompleteCode/kt59041.antlrtree.txt | 2 +- .../anonymousObjectsNested.antlrtree.txt | 7 +- ...pertyAccessorsAndConstructor.antlrtree.txt | 7 +- .../inNonPublicClass.antlrtree.txt | 7 +- .../inNonPublicInnerClass.antlrtree.txt | 7 +- .../nonPublicMember/inPackage.antlrtree.txt | 10 +- .../inPublicClass.antlrtree.txt | 14 +- .../nonPublicMember/localClass.antlrtree.txt | 7 +- .../diagnostics/kt53988.antlrtree.txt | 2 +- .../diagnostics/kt56769.antlrtree.txt | 2 +- grammar/testData/diagnostics/kt56769.diff | 1 + .../suspendAnonymousFunction.antlrtree.txt | 61 +- ...torsInComplexModuleStructure.antlrtree.txt | 2 +- .../kt362.other.antlrtree.txt | 20 +- .../nonGenericRawMember.main.antlrtree.txt | 7 +- ...ustHaveAccessorsOrBeAbstract.antlrtree.txt | 12 +- .../regressions/DoubleDefine.antlrtree.txt | 2 +- .../regressions/Jet124.antlrtree.txt | 2 +- .../regressions/Jet81.antlrtree.txt | 12 +- .../regressions/OutProjections.antlrtree.txt | 2 +- ...ypeMismatchOnUnaryOperations.antlrtree.txt | 27 +- .../regressions/kt549.antlrtree.txt | 2 +- .../scopes/visibility2.b.antlrtree.txt | 4 +- .../memberAnonymousObjects.antlrtree.txt | 5 +- ...suspendAnonymousAsNonSuspend.antlrtree.txt | 91 +- ...pendCallFromAnonymousSuspend.antlrtree.txt | 90 +- ...ursiveMultiFieldValueClasses.antlrtree.txt | 2 +- ...ddenUnderlyingTypeMultiField.antlrtree.txt | 2 +- .../diagnostics/when/When.antlrtree.txt | 6 +- .../testData/psi/IfWithPropery.antlrtree.txt | 2 +- grammar/testData/psi/Properties.antlrtree.txt | 34 +- ...ertiesFollowedByInitializers.antlrtree.txt | 6 +- .../WhenWithSubjectVariable_ERR.antlrtree.txt | 10 +- .../examples/AnonymousObjects.antlrtree.txt | 14 +- .../testData/psi/examples/Graph.antlrtree.txt | 12 +- .../testData/psi/examples/Stack.antlrtree.txt | 7 +- .../psi/examples/UnionFind.antlrtree.txt | 4 +- .../collections/IIterator.antlrtree.txt | 2 +- .../DelegateAndInitializer.antlrtree.txt | 3 +- .../GetterInSameLine.antlrtree.txt | 3 +- .../TwoProperties.antlrtree.txt | 8 +- ...semicolonBetweenDeclarations.antlrtree.txt | 12 +- 67 files changed, 15495 insertions(+), 12776 deletions(-) create mode 100644 grammar/testData/diagnostics/kt56769.diff diff --git a/grammar/testData/diagnostics/Abstract.b.antlrtree.txt b/grammar/testData/diagnostics/Abstract.b.antlrtree.txt index 63c5da2fb..bdd9b4201 100644 --- a/grammar/testData/diagnostics/Abstract.b.antlrtree.txt +++ b/grammar/testData/diagnostics/Abstract.b.antlrtree.txt @@ -1,4 +1,4 @@ -File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) +File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 packageHeader PACKAGE("package") identifier @@ -170,8 +170,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -243,8 +242,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -347,8 +345,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter SET("set") LPAREN("(") @@ -496,8 +493,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter SET("set") LPAREN("(") @@ -618,8 +614,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -727,8 +722,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -882,20 +876,19 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter modifiers modifier inheritanceModifier ABSTRACT("abstract") GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") semis NL("\n") NL("\n") @@ -980,8 +973,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -1006,14 +998,14 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression simpleIdentifier Identifier("i") - semis - SEMICOLON(";") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") semis NL("\n") NL("\n") @@ -1072,8 +1064,7 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -1144,20 +1135,19 @@ File: Abstract.b.kt - 1653c958f5acf2bb6dff2bd874377d98 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter modifiers modifier inheritanceModifier ABSTRACT("abstract") GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") semis NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/AbstractInAbstractClass.antlrtree.txt b/grammar/testData/diagnostics/AbstractInAbstractClass.antlrtree.txt index 19a592f56..4514322dc 100644 --- a/grammar/testData/diagnostics/AbstractInAbstractClass.antlrtree.txt +++ b/grammar/testData/diagnostics/AbstractInAbstractClass.antlrtree.txt @@ -1,4 +1,4 @@ -File: AbstractInAbstractClass.kt - f330f7abc48344d5e2331c0165649d1d (WITH_ERRORS) +File: AbstractInAbstractClass.kt - f330f7abc48344d5e2331c0165649d1d NL("\n") packageHeader PACKAGE("package") @@ -23,1187 +23,1181 @@ File: AbstractInAbstractClass.kt - f330f7abc48344d5e2331c0165649d1d (WITH_ERRORS classParameters LPAREN("(") RPAREN(")") - LCURL("{") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e2") - COLON(":") - type - typeReference - userType - simpleUserType + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("f") - functionValueParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("g") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - FUN("fun") - simpleIdentifier - Identifier("h") - functionValueParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - FUN("fun") - simpleIdentifier - Identifier("j") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("i") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("i1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("j") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("j1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("k") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("k1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("l") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("l1") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("n") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("h") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") + Identifier("j") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("l") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("l1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("n") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") semis NL("\n") - RCURL("}") - NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/AbstractInClass.antlrtree.txt b/grammar/testData/diagnostics/AbstractInClass.antlrtree.txt index cdc18d5a6..3c87bdb07 100644 --- a/grammar/testData/diagnostics/AbstractInClass.antlrtree.txt +++ b/grammar/testData/diagnostics/AbstractInClass.antlrtree.txt @@ -1,4 +1,4 @@ -File: AbstractInClass.kt - 0b3f5cf31761f3bc15c46f9cb3cf2061 (WITH_ERRORS) +File: AbstractInClass.kt - 0b3f5cf31761f3bc15c46f9cb3cf2061 NL("\n") packageHeader PACKAGE("package") @@ -19,1208 +19,1201 @@ File: AbstractInClass.kt - 0b3f5cf31761f3bc15c46f9cb3cf2061 (WITH_ERRORS) classParameters LPAREN("(") RPAREN(")") - LCURL("{") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b2") - COLON(":") - type - typeReference - userType - simpleUserType + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b3") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") simpleIdentifier - Identifier("Int") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c1") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("h") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") + Identifier("j") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("l") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("l1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("n") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") semis NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("f") - functionValueParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("g") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - FUN("fun") - simpleIdentifier - Identifier("h") - functionValueParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - FUN("fun") - simpleIdentifier - Identifier("j") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("i") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("i1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("j") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("j1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - semis - SEMICOLON(";") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("k") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("k1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("l") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("l1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("n") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - RCURL("}") - NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/AbstractInTrait.antlrtree.txt b/grammar/testData/diagnostics/AbstractInTrait.antlrtree.txt index 4faeadb01..a77283d6a 100644 --- a/grammar/testData/diagnostics/AbstractInTrait.antlrtree.txt +++ b/grammar/testData/diagnostics/AbstractInTrait.antlrtree.txt @@ -1,4 +1,4 @@ -File: AbstractInTrait.kt - 9339caa9e5d8c7bab0facd97d7d2767d (WITH_ERRORS) +File: AbstractInTrait.kt - 9339caa9e5d8c7bab0facd97d7d2767d NL("\n") packageHeader PACKAGE("package") @@ -15,1208 +15,1201 @@ File: AbstractInTrait.kt - 9339caa9e5d8c7bab0facd97d7d2767d (WITH_ERRORS) INTERFACE("interface") simpleIdentifier Identifier("MyTrait") - LCURL("{") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("a3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b2") - COLON(":") - type - typeReference - userType - simpleUserType + classBody + LCURL("{") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("a3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + visibilityModifier + PRIVATE("private") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e2") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + VAL("val") + variableDeclaration + simpleIdentifier + Identifier("e3") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("a") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b3") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("f") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + FUN("fun") simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - visibilityModifier - PRIVATE("private") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("g") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") simpleIdentifier - Identifier("Int") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c1") - COLON(":") - type - typeReference - userType - simpleUserType + Identifier("h") + functionValueParameters + LPAREN("(") + RPAREN(")") + semis + NL("\n") + classMemberDeclaration + declaration + functionDeclaration + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + FUN("fun") simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") + Identifier("j") + functionValueParameters + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("i1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("j1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("i") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("k1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("l") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("l1") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("0") + SEMICOLON(";") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + semis + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("n") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + getter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + GET("get") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") semis NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e2") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - VAL("val") - variableDeclaration - simpleIdentifier - Identifier("e3") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("a") - semis - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("f") - functionValueParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - FUN("fun") - simpleIdentifier - Identifier("g") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - FUN("fun") - simpleIdentifier - Identifier("h") - functionValueParameters - LPAREN("(") - RPAREN(")") - semis - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - FUN("fun") - simpleIdentifier - Identifier("j") - functionValueParameters - LPAREN("(") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("i") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("i1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("j") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("j1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("i") - semis - SEMICOLON(";") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("k") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("k1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("l") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("l1") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("0") - semi - SEMICOLON(";") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - topLevelObject - declaration - topLevelObject - declaration - ABSTRACT("abstract") - SET("set") - semis - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("n") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - getter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - GET("get") - setter - modifiers - modifier - inheritanceModifier - ABSTRACT("abstract") - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - NL("\n") - RCURL("}") - NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/StringTemplates.antlrtree.txt b/grammar/testData/diagnostics/StringTemplates.antlrtree.txt index 3a89fff72..8558b75b7 100644 --- a/grammar/testData/diagnostics/StringTemplates.antlrtree.txt +++ b/grammar/testData/diagnostics/StringTemplates.antlrtree.txt @@ -299,8 +299,8 @@ File: StringTemplates.kt - f256d93bb673431b85ca5564f0101234 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("3") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression diff --git a/grammar/testData/diagnostics/TypeInference.antlrtree.txt b/grammar/testData/diagnostics/TypeInference.antlrtree.txt index 49eb7afbe..02ec4c0b3 100644 --- a/grammar/testData/diagnostics/TypeInference.antlrtree.txt +++ b/grammar/testData/diagnostics/TypeInference.antlrtree.txt @@ -188,8 +188,8 @@ File: TypeInference.kt - 6a7460c91daaee5d18fa2597a125d33d valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -393,8 +393,8 @@ File: TypeInference.kt - 6a7460c91daaee5d18fa2597a125d33d valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration diff --git a/grammar/testData/diagnostics/TypeMismatchOnOverrideWithSyntaxErrors.antlrtree.txt b/grammar/testData/diagnostics/TypeMismatchOnOverrideWithSyntaxErrors.antlrtree.txt index 6bae2fc55..7ec13a39b 100644 --- a/grammar/testData/diagnostics/TypeMismatchOnOverrideWithSyntaxErrors.antlrtree.txt +++ b/grammar/testData/diagnostics/TypeMismatchOnOverrideWithSyntaxErrors.antlrtree.txt @@ -34,9 +34,8 @@ File: TypeMismatchOnOverrideWithSyntaxErrors.kt - 5562e52794b9edc95c27f33c8e2b9d simpleUserType simpleIdentifier Identifier("Int") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration declaration functionDeclaration diff --git a/grammar/testData/diagnostics/UnusedVariables.antlrtree.txt b/grammar/testData/diagnostics/UnusedVariables.antlrtree.txt index e3818485f..072d829f9 100644 --- a/grammar/testData/diagnostics/UnusedVariables.antlrtree.txt +++ b/grammar/testData/diagnostics/UnusedVariables.antlrtree.txt @@ -951,8 +951,8 @@ File: UnusedVariables.kt - 7594c9f59ad6c80aace24246580f65e8 primaryExpression literalConstant IntegerLiteral("1") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement assignment diff --git a/grammar/testData/diagnostics/annotations/AnnotatedConstructorParams.antlrtree.txt b/grammar/testData/diagnostics/annotations/AnnotatedConstructorParams.antlrtree.txt index 4f713d0d5..06b32ed53 100644 --- a/grammar/testData/diagnostics/annotations/AnnotatedConstructorParams.antlrtree.txt +++ b/grammar/testData/diagnostics/annotations/AnnotatedConstructorParams.antlrtree.txt @@ -96,9 +96,8 @@ File: AnnotatedConstructorParams.kt - ba8c91923e3c546505a94e3e3687c3a5 lineStringLiteral QUOTE_OPEN(""") QUOTE_CLOSE(""") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") topLevelObject declaration functionDeclaration diff --git a/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt index d2f6503b9..9ffb09b98 100644 --- a/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/ValDeferredInitInFinalClass.antlrtree.txt @@ -178,8 +178,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -220,8 +219,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -281,8 +279,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -327,8 +324,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -373,8 +369,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -438,8 +433,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -482,8 +476,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -502,8 +495,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -541,8 +533,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -565,8 +556,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -589,8 +579,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -632,8 +621,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -654,8 +642,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -696,8 +683,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -757,8 +743,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -803,8 +788,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -849,8 +833,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -914,8 +897,7 @@ File: ValDeferredInitInFinalClass.kt - 7cf4279485cf404c3934d991a22d072c primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") diff --git a/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt index aab81d064..d23bb8b65 100644 --- a/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValError.antlrtree.txt @@ -175,8 +175,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -217,8 +216,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -278,8 +276,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -324,8 +321,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -370,8 +366,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -435,8 +430,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -479,8 +473,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -499,8 +492,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -538,8 +530,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -562,8 +553,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -586,8 +576,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -629,8 +618,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -651,8 +639,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -693,8 +680,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -754,8 +740,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -800,8 +785,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -846,8 +830,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -911,8 +894,7 @@ File: ValDeferredInitInOpenClassOpenValError.kt - c90b19253f05a5379ebb43ef887592 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") diff --git a/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt index 2bf765873..4342f1c36 100644 --- a/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/ValDeferredInitInOpenClassOpenValWarning.antlrtree.txt @@ -175,8 +175,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -217,8 +216,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -278,8 +276,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -324,8 +321,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -370,8 +366,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -435,8 +430,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -479,8 +473,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -499,8 +492,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -538,8 +530,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -562,8 +553,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -586,8 +576,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -629,8 +618,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -651,8 +639,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -693,8 +680,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -754,8 +740,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -800,8 +785,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -846,8 +830,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -911,8 +894,7 @@ File: ValDeferredInitInOpenClassOpenValWarning.kt - 40f65b51752767150eb5acf2ff66 primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") diff --git a/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt b/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt index c4dd8bc40..090ef672e 100644 --- a/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/VarDeferredInitInFinalClass.antlrtree.txt @@ -48,4383 +48,5755 @@ File: VarDeferredInitInFinalClass.kt - 785ac3ec41629d327f140246e4a43324 simpleUserType simpleIdentifier Identifier("I") - LCURL("{") - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") + classBody + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + memberModifier + OVERRIDE("override") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a00") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a01") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a02") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a03") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a10") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a11") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a12") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a13") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a20") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a21") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a22") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a23") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a30") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a31") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a32") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a33") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b00") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b01") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b02") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b03") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b10") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b11") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b12") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b13") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b20") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b21") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b22") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b23") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b30") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b31") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b32") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b33") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - memberModifier - OVERRIDE("override") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - NL("\n") - INIT("init") - LCURL("{") - NL("\n") - Identifier("a00") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a01") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a02") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a03") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a10") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a11") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a12") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a13") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a20") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a21") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a22") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a23") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a30") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a31") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a32") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a33") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - NL("\n") - Identifier("b00") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b01") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b02") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b03") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b10") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b11") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b12") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b13") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b20") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b21") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b22") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b23") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b30") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b31") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b32") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b33") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - RCURL("}") - NL("\n") - RCURL("}") - NL("\n") - NL("\n") + NL("\n") + NL("\n") topLevelObject declaration classDeclaration diff --git a/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt b/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt index 7722ce41b..6b7cfb9ba 100644 --- a/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt +++ b/grammar/testData/diagnostics/backingField/VarDeferredInitInOpenClass.antlrtree.txt @@ -44,4380 +44,5752 @@ File: VarDeferredInitInOpenClass.kt - 5de6fdada1ebc05e76cd774159cf0e38 CLASS("class") simpleIdentifier Identifier("Foo") - LCURL("{") - NL("\n") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - semis - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d00") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d01") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d02") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d03") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") + classBody + LCURL("{") + NL("\n") + NL("\n") + NL("\n") + classMemberDeclarations + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d00") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d01") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d02") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d03") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d10") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d11") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d12") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d13") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + FIELD("field") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d20") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d21") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d22") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d23") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("a33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("e33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("c33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("b33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("f33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d30") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d31") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + FIELD("field") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("v") + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d32") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + classMemberDeclaration + declaration + propertyDeclaration + modifiers + modifier + inheritanceModifier + OPEN("open") + VAR("var") + variableDeclaration + simpleIdentifier + Identifier("d33") + COLON(":") + type + typeReference + userType + simpleUserType + simpleIdentifier + Identifier("Int") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + SEMICOLON(";") + setter + SET("set") + LPAREN("(") + functionValueParameterWithOptionalType + parameterWithOptionalType + simpleIdentifier + Identifier("v") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + getter + GET("get") + LPAREN("(") + RPAREN(")") + functionBody + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + SEMICOLON(";") + NL("\n") + NL("\n") + classMemberDeclaration + anonymousInitializer + INIT("init") + block + LCURL("{") + NL("\n") + statements + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a00") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a01") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a02") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a03") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a10") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a11") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a12") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a13") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a20") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a21") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a22") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a23") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a30") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a31") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a32") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("a33") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b00") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b01") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b02") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b03") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b10") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b11") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b12") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b13") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b20") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b21") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b22") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b23") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b30") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b31") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b32") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + statement + assignment + directlyAssignableExpression + simpleIdentifier + Identifier("b33") + ASSIGNMENT("=") + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + literalConstant + IntegerLiteral("1") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") semis - SEMICOLON(";") NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d10") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - FIELD("field") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d11") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d12") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d13") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - FIELD("field") - SEMICOLON(";") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d20") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d21") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d22") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d23") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - SEMICOLON(";") - NL("\n") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("a33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("e33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("c33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("b33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("f33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d30") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - getter - GET("get") - LPAREN("(") - RPAREN(")") - functionBody - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semis - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d31") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - statement - assignment - directlyAssignableExpression - simpleIdentifier - FIELD("field") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - simpleIdentifier - Identifier("v") - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d32") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - topLevelObject - declaration - propertyDeclaration - modifiers - modifier - inheritanceModifier - OPEN("open") - VAR("var") - variableDeclaration - simpleIdentifier - Identifier("d33") - COLON(":") - type - typeReference - userType - simpleUserType - simpleIdentifier - Identifier("Int") - ASSIGNMENT("=") - expression - disjunction - conjunction - equality - comparison - genericCallLikeComparison - infixOperation - elvisExpression - infixFunctionCall - rangeExpression - additiveExpression - multiplicativeExpression - asExpression - prefixUnaryExpression - postfixUnaryExpression - primaryExpression - literalConstant - IntegerLiteral("1") - semi - SEMICOLON(";") - setter - SET("set") - LPAREN("(") - functionValueParameterWithOptionalType - parameterWithOptionalType - simpleIdentifier - Identifier("v") - RPAREN(")") - functionBody - block - LCURL("{") - statements - RCURL("}") - GET("get") - LPAREN("(") - RPAREN(")") - ASSIGNMENT("=") - IntegerLiteral("1") - SEMICOLON(";") - NL("\n") - NL("\n") - INIT("init") - LCURL("{") - NL("\n") - Identifier("a00") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a01") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a02") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a03") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a10") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a11") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a12") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a13") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a20") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a21") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a22") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a23") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a30") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a31") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a32") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("a33") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - NL("\n") - Identifier("b00") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b01") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b02") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b03") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b10") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b11") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b12") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b13") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b20") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b21") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b22") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b23") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b30") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b31") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b32") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - Identifier("b33") - ASSIGNMENT("=") - IntegerLiteral("1") - NL("\n") - RCURL("}") - NL("\n") - RCURL("}") - NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt index 7fe127dfe..ad192ba46 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/cfgOfFullyIncorrectCode.antlrtree.txt @@ -1,4 +1,4 @@ -File: cfgOfFullyIncorrectCode.kt - 42e28eb7a0614778b6d46198c6552798 +File: cfgOfFullyIncorrectCode.kt - 42e28eb7a0614778b6d46198c6552798 (WITH_ERRORS) NL("\n") NL("\n") LCURL("{") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/kt2330.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/kt2330.antlrtree.txt index 44c756bb7..b11a4650d 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/kt2330.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/kt2330.antlrtree.txt @@ -128,10 +128,9 @@ File: kt2330.kt - 0c7cef6a99a44e2be67eaa7bedce81e3 valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration anonymousInitializer INIT("init") @@ -511,9 +510,8 @@ File: kt2330.kt - 0c7cef6a99a44e2be67eaa7bedce81e3 valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration anonymousInitializer INIT("init") diff --git a/grammar/testData/diagnostics/controlFlowAnalysis/kt2845.antlrtree.txt b/grammar/testData/diagnostics/controlFlowAnalysis/kt2845.antlrtree.txt index cf5265894..c839b3f48 100644 --- a/grammar/testData/diagnostics/controlFlowAnalysis/kt2845.antlrtree.txt +++ b/grammar/testData/diagnostics/controlFlowAnalysis/kt2845.antlrtree.txt @@ -75,8 +75,8 @@ File: kt2845.kt - 0ba0a08dc0750c51b992e95769c7485b RANGLE(">") quest QUEST_WS("? ") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression diff --git a/grammar/testData/diagnostics/controlStructures/improperElseInExpression.antlrtree.txt b/grammar/testData/diagnostics/controlStructures/improperElseInExpression.antlrtree.txt index ca1daa9e3..293aca01c 100644 --- a/grammar/testData/diagnostics/controlStructures/improperElseInExpression.antlrtree.txt +++ b/grammar/testData/diagnostics/controlStructures/improperElseInExpression.antlrtree.txt @@ -535,9 +535,9 @@ File: improperElseInExpression.kt - f017877954aa23be6748cd4e67201c3b valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") + NL("\n") semis - SEMICOLON(";") - NL("\n") NL("\n") statement expression diff --git a/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt b/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt index 108b136cb..c9ed21f48 100644 --- a/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt +++ b/grammar/testData/diagnostics/controlStructures/whenWithNoSubjectAndCommas.antlrtree.txt @@ -1,4 +1,4 @@ -File: whenWithNoSubjectAndCommas.kt - 8f9c4164b0f097cc571f276c956d8192 +File: whenWithNoSubjectAndCommas.kt - 8f9c4164b0f097cc571f276c956d8192 (WITH_ERRORS) NL("\n") packageHeader importList diff --git a/grammar/testData/diagnostics/declarationChecks/DataFlowInfoInMultiDecl.antlrtree.txt b/grammar/testData/diagnostics/declarationChecks/DataFlowInfoInMultiDecl.antlrtree.txt index 0e0ebc29c..feed17f91 100644 --- a/grammar/testData/diagnostics/declarationChecks/DataFlowInfoInMultiDecl.antlrtree.txt +++ b/grammar/testData/diagnostics/declarationChecks/DataFlowInfoInMultiDecl.antlrtree.txt @@ -232,9 +232,8 @@ File: DataFlowInfoInMultiDecl.kt - a34a5ab85232230fee709442a8238144 primaryExpression simpleIdentifier Identifier("aa") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") RCURL("}") semis NL("\n") @@ -324,9 +323,8 @@ File: DataFlowInfoInMultiDecl.kt - a34a5ab85232230fee709442a8238144 primaryExpression simpleIdentifier Identifier("b") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/declarationChecks/RedeclarationsInMultiDecl.antlrtree.txt b/grammar/testData/diagnostics/declarationChecks/RedeclarationsInMultiDecl.antlrtree.txt index b3f24291f..190249c7a 100644 --- a/grammar/testData/diagnostics/declarationChecks/RedeclarationsInMultiDecl.antlrtree.txt +++ b/grammar/testData/diagnostics/declarationChecks/RedeclarationsInMultiDecl.antlrtree.txt @@ -191,8 +191,8 @@ File: RedeclarationsInMultiDecl.kt - 0d7bcbe9b64d3edf33292f001b928392 valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -305,9 +305,8 @@ File: RedeclarationsInMultiDecl.kt - 0d7bcbe9b64d3edf33292f001b928392 valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/enum/AbstractInEnum.antlrtree.txt b/grammar/testData/diagnostics/enum/AbstractInEnum.antlrtree.txt index 1fb3f5700..707fa9e7a 100644 --- a/grammar/testData/diagnostics/enum/AbstractInEnum.antlrtree.txt +++ b/grammar/testData/diagnostics/enum/AbstractInEnum.antlrtree.txt @@ -1,4 +1,4 @@ -File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) +File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 packageHeader PACKAGE("package") identifier @@ -196,8 +196,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -269,8 +268,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -373,8 +371,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter SET("set") LPAREN("(") @@ -522,8 +519,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter SET("set") LPAREN("(") @@ -644,8 +640,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -753,8 +748,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -908,18 +902,19 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter modifiers modifier inheritanceModifier ABSTRACT("abstract") GET("get") - classMemberDeclaration - classMemberDeclaration - ABSTRACT("abstract") - SET("set") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") semis NL("\n") NL("\n") @@ -1004,8 +999,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") @@ -1030,12 +1024,14 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression simpleIdentifier Identifier("i") - semis - SEMICOLON(";") - classMemberDeclaration - classMemberDeclaration - ABSTRACT("abstract") - SET("set") + semi + SEMICOLON(";") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") semis NL("\n") NL("\n") @@ -1094,8 +1090,7 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -1166,18 +1161,19 @@ File: AbstractInEnum.kt - 3122735d29c6652627ec7162de9bb560 (WITH_ERRORS) primaryExpression literalConstant IntegerLiteral("0") - semi - SEMICOLON(";") + SEMICOLON(";") getter modifiers modifier inheritanceModifier ABSTRACT("abstract") GET("get") - classMemberDeclaration - classMemberDeclaration - ABSTRACT("abstract") - SET("set") + setter + modifiers + modifier + inheritanceModifier + ABSTRACT("abstract") + SET("set") semis NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt index c416bcdb8..f48b8a6df 100644 --- a/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/extensions/contextReceivers/noContextReceiversOnValueClasses.antlrtree.txt @@ -1,4 +1,4 @@ -File: noContextReceiversOnValueClasses.kt - 1b33dfade05b2933952e3e49db73b161 +File: noContextReceiversOnValueClasses.kt - 1b33dfade05b2933952e3e49db73b161 (WITH_ERRORS) NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt b/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt index 98d7ea381..376718454 100644 --- a/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt +++ b/grammar/testData/diagnostics/extensions/contextReceivers/twoReceiverCandidatesError.antlrtree.txt @@ -1,4 +1,4 @@ -File: twoReceiverCandidatesError.kt - ef4f9891a2591e8b77f5af0d810c3b01 +File: twoReceiverCandidatesError.kt - ef4f9891a2591e8b77f5af0d810c3b01 (WITH_ERRORS) NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/functionLiterals/functionLiteralInIf.antlrtree.txt b/grammar/testData/diagnostics/functionLiterals/functionLiteralInIf.antlrtree.txt index 4d8077950..428f8ef3a 100644 --- a/grammar/testData/diagnostics/functionLiterals/functionLiteralInIf.antlrtree.txt +++ b/grammar/testData/diagnostics/functionLiterals/functionLiteralInIf.antlrtree.txt @@ -144,8 +144,8 @@ File: functionLiteralInIf.kt - aa89fd0a1996f7b477b936e579313274 valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression diff --git a/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt b/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt index 6dde5f8b8..924802441 100644 --- a/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt +++ b/grammar/testData/diagnostics/incompleteCode/kt59041.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt59041.kt - c760b6913d1fae9c44206ea7b67da696 +File: kt59041.kt - c760b6913d1fae9c44206ea7b67da696 (WITH_ERRORS) NL("\n") NL("\n") packageHeader diff --git a/grammar/testData/diagnostics/inline/nonLocalReturns/anonymousObjectsNested.antlrtree.txt b/grammar/testData/diagnostics/inline/nonLocalReturns/anonymousObjectsNested.antlrtree.txt index f9251ad7c..ce7325dd2 100644 --- a/grammar/testData/diagnostics/inline/nonLocalReturns/anonymousObjectsNested.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonLocalReturns/anonymousObjectsNested.antlrtree.txt @@ -109,10 +109,9 @@ File: anonymousObjectsNested.kt - 027e58c20e0fb7215f1b7e37ce74a7c5 valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration anonymousInitializer INIT("init") diff --git a/grammar/testData/diagnostics/inline/nonLocalReturns/propertyAccessorsAndConstructor.antlrtree.txt b/grammar/testData/diagnostics/inline/nonLocalReturns/propertyAccessorsAndConstructor.antlrtree.txt index 589a0c7de..1d49265f2 100644 --- a/grammar/testData/diagnostics/inline/nonLocalReturns/propertyAccessorsAndConstructor.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonLocalReturns/propertyAccessorsAndConstructor.antlrtree.txt @@ -256,10 +256,9 @@ File: propertyAccessorsAndConstructor.kt - dd026170a5d14a7ea560baea3c3c37ec thisExpression THIS("this") RCURL("}") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration propertyDeclaration diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicClass.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicClass.antlrtree.txt index 9bbdee1ce..4b6003429 100644 --- a/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicClass.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicClass.antlrtree.txt @@ -320,10 +320,9 @@ File: inNonPublicClass.kt - de68bb8cc2319e7c3ff044dc07ec728f primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration propertyDeclaration diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicInnerClass.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicInnerClass.antlrtree.txt index f97cd7f10..1b04b558b 100644 --- a/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicInnerClass.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonPublicMember/inNonPublicInnerClass.antlrtree.txt @@ -47,10 +47,9 @@ File: inNonPublicInnerClass.kt - 4ebae0505399a6ca7ff62a9c198148dc primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration propertyDeclaration diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/inPackage.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/inPackage.antlrtree.txt index 4239865d2..bf43c15c7 100644 --- a/grammar/testData/diagnostics/inline/nonPublicMember/inPackage.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonPublicMember/inPackage.antlrtree.txt @@ -34,9 +34,8 @@ File: inPackage.kt - 9b31b38b82a00918bffa5524e9648543 primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") topLevelObject declaration functionDeclaration @@ -88,9 +87,8 @@ File: inPackage.kt - 9b31b38b82a00918bffa5524e9648543 primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") topLevelObject declaration functionDeclaration diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/inPublicClass.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/inPublicClass.antlrtree.txt index 585463cb6..840a2e502 100644 --- a/grammar/testData/diagnostics/inline/nonPublicMember/inPublicClass.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonPublicMember/inPublicClass.antlrtree.txt @@ -47,10 +47,9 @@ File: inPublicClass.kt - da1090a350f9a8616bade7e909c8ba06 primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration @@ -310,10 +309,9 @@ File: inPublicClass.kt - da1090a350f9a8616bade7e909c8ba06 primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration diff --git a/grammar/testData/diagnostics/inline/nonPublicMember/localClass.antlrtree.txt b/grammar/testData/diagnostics/inline/nonPublicMember/localClass.antlrtree.txt index 6dce41ccf..17ccc6122 100644 --- a/grammar/testData/diagnostics/inline/nonPublicMember/localClass.antlrtree.txt +++ b/grammar/testData/diagnostics/inline/nonPublicMember/localClass.antlrtree.txt @@ -48,10 +48,9 @@ File: localClass.kt - fb0e7622600e978853b95eda7aedcee8 primaryExpression literalConstant IntegerLiteral("11") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration diff --git a/grammar/testData/diagnostics/kt53988.antlrtree.txt b/grammar/testData/diagnostics/kt53988.antlrtree.txt index 20356e609..a99c81c1c 100644 --- a/grammar/testData/diagnostics/kt53988.antlrtree.txt +++ b/grammar/testData/diagnostics/kt53988.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt53988.kt - c669232d3f33356b39a77eefaaa32170 +File: kt53988.kt - c669232d3f33356b39a77eefaaa32170 (WITH_ERRORS) packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/kt56769.antlrtree.txt b/grammar/testData/diagnostics/kt56769.antlrtree.txt index 8ca7665e2..ecdaf050e 100644 --- a/grammar/testData/diagnostics/kt56769.antlrtree.txt +++ b/grammar/testData/diagnostics/kt56769.antlrtree.txt @@ -1,4 +1,4 @@ -File: kt56769.kt - e03c63ffb9f5abf53f1ec72237187bc1 +File: kt56769.kt - e03c63ffb9f5abf53f1ec72237187bc1 (WITH_ERRORS) packageHeader importList topLevelObject diff --git a/grammar/testData/diagnostics/kt56769.diff b/grammar/testData/diagnostics/kt56769.diff new file mode 100644 index 000000000..9bcc278af --- /dev/null +++ b/grammar/testData/diagnostics/kt56769.diff @@ -0,0 +1 @@ +Needs handling of `@file:` annotations in arbitrary positions \ No newline at end of file diff --git a/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt b/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt index 244440a26..359829378 100644 --- a/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt +++ b/grammar/testData/diagnostics/modifiers/suspendAnonymousFunction.antlrtree.txt @@ -13,24 +13,45 @@ File: suspendAnonymousFunction.kt - 26e4e7dc69d65e0001d894763e520dab functionValueParameters LPAREN("(") RPAREN(")") - LCURL("{") - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - functionModifier - SUSPEND("suspend") - FUN("fun") - receiverType - LPAREN("(") - RPAREN(")") - LCURL("{") - NL("\n") - NL("\n") - RCURL("}") - NL("\n") - RCURL("}") - NL("\n") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + SUSPEND("suspend") + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + NL("\n") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt index 2e61861a8..139800f9e 100644 --- a/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt +++ b/grammar/testData/diagnostics/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.antlrtree.txt @@ -1,4 +1,4 @@ -File: sealedInheritorsInComplexModuleStructure.kt - 4c1e81cd4113a2af8a8293a0b1270394 +File: sealedInheritorsInComplexModuleStructure.kt - 4c1e81cd4113a2af8a8293a0b1270394 (WITH_ERRORS) NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/nullabilityAndSmartCasts/kt362.other.antlrtree.txt b/grammar/testData/diagnostics/nullabilityAndSmartCasts/kt362.other.antlrtree.txt index 842294bf9..aa3e3d298 100644 --- a/grammar/testData/diagnostics/nullabilityAndSmartCasts/kt362.other.antlrtree.txt +++ b/grammar/testData/diagnostics/nullabilityAndSmartCasts/kt362.other.antlrtree.txt @@ -66,9 +66,8 @@ File: kt362.other.kt - 677233dfb91c2b28b313a4ddbcff0e03 primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration declaration propertyDeclaration @@ -109,9 +108,8 @@ File: kt362.other.kt - 677233dfb91c2b28b313a4ddbcff0e03 primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration declaration propertyDeclaration @@ -210,9 +208,8 @@ File: kt362.other.kt - 677233dfb91c2b28b313a4ddbcff0e03 primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration declaration propertyDeclaration @@ -253,9 +250,8 @@ File: kt362.other.kt - 677233dfb91c2b28b313a4ddbcff0e03 primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration declaration propertyDeclaration diff --git a/grammar/testData/diagnostics/platformTypes/rawTypes/nonGenericRawMember.main.antlrtree.txt b/grammar/testData/diagnostics/platformTypes/rawTypes/nonGenericRawMember.main.antlrtree.txt index 458d2beaf..dc8245405 100644 --- a/grammar/testData/diagnostics/platformTypes/rawTypes/nonGenericRawMember.main.antlrtree.txt +++ b/grammar/testData/diagnostics/platformTypes/rawTypes/nonGenericRawMember.main.antlrtree.txt @@ -100,10 +100,9 @@ File: nonGenericRawMember.main.kt - 78c36410ba6ff6ecfba38a110db29a53 (WITH_ERROR DOT(".") simpleIdentifier Identifier("b") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration diff --git a/grammar/testData/diagnostics/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.antlrtree.txt b/grammar/testData/diagnostics/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.antlrtree.txt index b43bc964d..29593256d 100644 --- a/grammar/testData/diagnostics/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.antlrtree.txt +++ b/grammar/testData/diagnostics/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.antlrtree.txt @@ -68,8 +68,7 @@ File: extensionPropertyMustHaveAccessorsOrBeAbstract.kt - 520e0098aa6d098883d3b8 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -154,8 +153,7 @@ File: extensionPropertyMustHaveAccessorsOrBeAbstract.kt - 520e0098aa6d098883d3b8 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -243,8 +241,7 @@ File: extensionPropertyMustHaveAccessorsOrBeAbstract.kt - 520e0098aa6d098883d3b8 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier @@ -336,8 +333,7 @@ File: extensionPropertyMustHaveAccessorsOrBeAbstract.kt - 520e0098aa6d098883d3b8 simpleUserType simpleIdentifier Identifier("Int") - semi - SEMICOLON(";") + SEMICOLON(";") setter modifiers modifier diff --git a/grammar/testData/diagnostics/regressions/DoubleDefine.antlrtree.txt b/grammar/testData/diagnostics/regressions/DoubleDefine.antlrtree.txt index d6b2763d2..456289377 100644 --- a/grammar/testData/diagnostics/regressions/DoubleDefine.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/DoubleDefine.antlrtree.txt @@ -1650,8 +1650,8 @@ File: DoubleDefine.kt - 986825ddcb366c1ba141202300e77665 valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration diff --git a/grammar/testData/diagnostics/regressions/Jet124.antlrtree.txt b/grammar/testData/diagnostics/regressions/Jet124.antlrtree.txt index e52eb7454..244bee3d2 100644 --- a/grammar/testData/diagnostics/regressions/Jet124.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/Jet124.antlrtree.txt @@ -152,8 +152,8 @@ File: Jet124.kt - b9fbf2a6f2323faac53a4f4429b52077 valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression diff --git a/grammar/testData/diagnostics/regressions/Jet81.antlrtree.txt b/grammar/testData/diagnostics/regressions/Jet81.antlrtree.txt index 09fcec76c..697f7584c 100644 --- a/grammar/testData/diagnostics/regressions/Jet81.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/Jet81.antlrtree.txt @@ -74,9 +74,8 @@ File: Jet81.kt - 0bdadbd5ac39f906344e99ac5f3eb349 primaryExpression simpleIdentifier Identifier("y") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") RCURL("}") NL("\n") NL("\n") @@ -112,10 +111,9 @@ File: Jet81.kt - 0bdadbd5ac39f906344e99ac5f3eb349 DOT(".") simpleIdentifier Identifier("a") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/regressions/OutProjections.antlrtree.txt b/grammar/testData/diagnostics/regressions/OutProjections.antlrtree.txt index 954a098ad..15d8ea085 100644 --- a/grammar/testData/diagnostics/regressions/OutProjections.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/OutProjections.antlrtree.txt @@ -446,8 +446,8 @@ File: OutProjections.kt - 450665203361aa0a3588776ae0e8db65 valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression diff --git a/grammar/testData/diagnostics/regressions/TypeMismatchOnUnaryOperations.antlrtree.txt b/grammar/testData/diagnostics/regressions/TypeMismatchOnUnaryOperations.antlrtree.txt index 3fc5b0f2e..93f562e51 100644 --- a/grammar/testData/diagnostics/regressions/TypeMismatchOnUnaryOperations.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/TypeMismatchOnUnaryOperations.antlrtree.txt @@ -51,8 +51,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression literalConstant NullLiteral("null") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -115,8 +115,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression simpleIdentifier Identifier("v") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -156,8 +156,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 EXCL_NO_WS("!") excl EXCL_NO_WS("!") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -195,8 +195,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 postfixUnarySuffix postfixUnaryOperator INCR("++") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -234,8 +234,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression simpleIdentifier Identifier("v") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -273,8 +273,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 postfixUnarySuffix postfixUnaryOperator DECR("--") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -312,8 +312,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression simpleIdentifier Identifier("v") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -352,8 +352,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression literalConstant BooleanLiteral("true") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -393,8 +393,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression literalConstant BooleanLiteral("true") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -439,8 +439,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression literalConstant BooleanLiteral("true") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -478,8 +478,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression literalConstant IntegerLiteral("1") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -517,9 +517,8 @@ File: TypeMismatchOnUnaryOperations.kt - a23175f66c9409d7c5eb4964cfa2c5a6 primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") RCURL("}") semis NL("\n") diff --git a/grammar/testData/diagnostics/regressions/kt549.antlrtree.txt b/grammar/testData/diagnostics/regressions/kt549.antlrtree.txt index 7a2ce9693..d47546ef2 100644 --- a/grammar/testData/diagnostics/regressions/kt549.antlrtree.txt +++ b/grammar/testData/diagnostics/regressions/kt549.antlrtree.txt @@ -147,8 +147,8 @@ File: kt549.kt - 6e80c670a8b68335050da0f6ddf0ddcd valueArguments LPAREN("(") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement loopStatement diff --git a/grammar/testData/diagnostics/scopes/visibility2.b.antlrtree.txt b/grammar/testData/diagnostics/scopes/visibility2.b.antlrtree.txt index ffa8c15db..8ec7b3a82 100644 --- a/grammar/testData/diagnostics/scopes/visibility2.b.antlrtree.txt +++ b/grammar/testData/diagnostics/scopes/visibility2.b.antlrtree.txt @@ -232,9 +232,9 @@ File: visibility2.b.kt - 8bb953eb2db39d58fd01f9ae5213cbda simpleIdentifier Identifier("Int") RANGLE(">") + SEMICOLON(";") + NL("\n") semis - SEMICOLON(";") - NL("\n") NL("\n") statement declaration diff --git a/grammar/testData/diagnostics/subtyping/memberAnonymousObjects.antlrtree.txt b/grammar/testData/diagnostics/subtyping/memberAnonymousObjects.antlrtree.txt index d898d04cd..0bc653f47 100644 --- a/grammar/testData/diagnostics/subtyping/memberAnonymousObjects.antlrtree.txt +++ b/grammar/testData/diagnostics/subtyping/memberAnonymousObjects.antlrtree.txt @@ -45,9 +45,8 @@ File: memberAnonymousObjects.kt - b38d69d15c5f678d5e4c15af616f4fdb LCURL("{") classMemberDeclarations RCURL("}") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration anonymousInitializer INIT("init") diff --git a/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt b/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt index b3f14c72e..0c472966d 100644 --- a/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt +++ b/grammar/testData/diagnostics/suspendConversion/suspendAnonymousAsNonSuspend.antlrtree.txt @@ -79,27 +79,72 @@ File: suspendAnonymousAsNonSuspend.kt - e178c9ebb4f76c98a97c17a3997f69b2 functionValueParameters LPAREN("(") RPAREN(")") - LCURL("{") - NL("\n") - Identifier("produce") - LCURL("{") - NL("\n") - topLevelObject - declaration - functionDeclaration - modifiers - modifier - functionModifier - SUSPEND("suspend") - FUN("fun") - receiverType - LPAREN("(") - RPAREN(")") - LCURL("{") - RCURL("}") - NL("\n") - RCURL("}") - NL("\n") - RCURL("}") - NL("\n") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("produce") + postfixUnarySuffix + callSuffix + annotatedLambda + lambdaLiteral + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + SUSPEND("suspend") + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + statements + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") EOF("") diff --git a/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt b/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt index f95b234bb..4dd423dd3 100644 --- a/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt +++ b/grammar/testData/diagnostics/suspendConversion/suspendCallFromAnonymousSuspend.antlrtree.txt @@ -13,8 +13,73 @@ File: suspendCallFromAnonymousSuspend.kt - d7a03c31795075a8132f7c54b289e493 functionValueParameters LPAREN("(") RPAREN(")") - LCURL("{") - NL("\n") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + functionLiteral + anonymousFunction + SUSPEND("suspend") + FUN("fun") + parametersWithOptionalType + LPAREN("(") + RPAREN(")") + functionBody + block + LCURL("{") + NL("\n") + statements + statement + expression + disjunction + conjunction + equality + comparison + genericCallLikeComparison + infixOperation + elvisExpression + infixFunctionCall + rangeExpression + additiveExpression + multiplicativeExpression + asExpression + prefixUnaryExpression + postfixUnaryExpression + primaryExpression + simpleIdentifier + Identifier("bar") + postfixUnarySuffix + callSuffix + valueArguments + LPAREN("(") + RPAREN(")") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + RCURL("}") + semis + NL("\n") + NL("\n") topLevelObject declaration functionDeclaration @@ -23,27 +88,6 @@ File: suspendCallFromAnonymousSuspend.kt - d7a03c31795075a8132f7c54b289e493 functionModifier SUSPEND("suspend") FUN("fun") - receiverType - LPAREN("(") - RPAREN(")") - LCURL("{") - NL("\n") - Identifier("bar") - LPAREN("(") - RPAREN(")") - NL("\n") - RCURL("}") - NL("\n") - RCURL("}") - NL("\n") - NL("\n") - DOT("") - simpleIdentifier - SUSPEND("suspend") - topLevelObject - declaration - functionDeclaration - FUN("fun") simpleIdentifier Identifier("bar") functionValueParameters diff --git a/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt index b44dcecb6..446900bdf 100644 --- a/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/recursiveMultiFieldValueClasses.antlrtree.txt @@ -1,4 +1,4 @@ -File: recursiveMultiFieldValueClasses.kt - 27f23077cb2d62b5751be49c513cb6b6 (WITH_ERRORS) +File: recursiveMultiFieldValueClasses.kt - 27f23077cb2d62b5751be49c513cb6b6 NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt b/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt index f8843dd45..d49be26fc 100644 --- a/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt +++ b/grammar/testData/diagnostics/valueClasses/valueClassWithForbiddenUnderlyingTypeMultiField.antlrtree.txt @@ -1,4 +1,4 @@ -File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - 55d9cabe504d9d8a5cf0924c17bd3c8b (WITH_ERRORS) +File: valueClassWithForbiddenUnderlyingTypeMultiField.kt - 55d9cabe504d9d8a5cf0924c17bd3c8b NL("\n") NL("\n") NL("\n") diff --git a/grammar/testData/diagnostics/when/When.antlrtree.txt b/grammar/testData/diagnostics/when/When.antlrtree.txt index d76b38e84..9f7e7705d 100644 --- a/grammar/testData/diagnostics/when/When.antlrtree.txt +++ b/grammar/testData/diagnostics/when/When.antlrtree.txt @@ -709,8 +709,8 @@ File: When.kt - a7a50ddbab493d0701838f0cf7557807 primaryExpression literalConstant IntegerLiteral("1") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement declaration @@ -740,9 +740,9 @@ File: When.kt - a7a50ddbab493d0701838f0cf7557807 lineStringLiteral QUOTE_OPEN(""") QUOTE_CLOSE(""") + SEMICOLON(";") + NL("\n") semis - SEMICOLON(";") - NL("\n") NL("\n") statement expression diff --git a/grammar/testData/psi/IfWithPropery.antlrtree.txt b/grammar/testData/psi/IfWithPropery.antlrtree.txt index a9c190201..f8a9ac73e 100644 --- a/grammar/testData/psi/IfWithPropery.antlrtree.txt +++ b/grammar/testData/psi/IfWithPropery.antlrtree.txt @@ -202,8 +202,8 @@ File: IfWithPropery.kt - 0dcb16ed0299eb6f8fea2b909a32d2b4 primaryExpression simpleIdentifier Identifier("a") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression diff --git a/grammar/testData/psi/Properties.antlrtree.txt b/grammar/testData/psi/Properties.antlrtree.txt index 7af0c4a91..5d0438194 100644 --- a/grammar/testData/psi/Properties.antlrtree.txt +++ b/grammar/testData/psi/Properties.antlrtree.txt @@ -1,4 +1,4 @@ -File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd +File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd (MUTE_PSI_ERRORS) packageHeader importList topLevelObject @@ -40,8 +40,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd simpleIdentifier Identifier("bar") NL("\n") - semis - NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration @@ -49,8 +48,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd variableDeclaration simpleIdentifier Identifier("foo") - semis - NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration @@ -68,8 +66,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd RSQUARE("]") simpleIdentifier Identifier("foo") - semis - NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration @@ -85,8 +82,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd simpleIdentifier Identifier("bar") NL("\n") - semis - NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration @@ -101,8 +97,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd simpleUserType simpleIdentifier Identifier("T") - semis - NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration @@ -139,8 +134,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd primaryExpression simpleIdentifier Identifier("bar") - semis - NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration @@ -346,8 +340,7 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd primaryExpression literalConstant IntegerLiteral("5") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") semis @@ -378,13 +371,14 @@ File: Properties.kt - e9021b6e89d148e4efad7f854dacf9bd primaryExpression literalConstant IntegerLiteral("1") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") - SET("set") - NL("\n") - NL("\n") + setter + SET("set") + semis + NL("\n") + NL("\n") topLevelObject declaration propertyDeclaration diff --git a/grammar/testData/psi/PropertiesFollowedByInitializers.antlrtree.txt b/grammar/testData/psi/PropertiesFollowedByInitializers.antlrtree.txt index 3059dd521..405f9d20c 100644 --- a/grammar/testData/psi/PropertiesFollowedByInitializers.antlrtree.txt +++ b/grammar/testData/psi/PropertiesFollowedByInitializers.antlrtree.txt @@ -389,8 +389,7 @@ File: PropertiesFollowedByInitializers.kt - 4321c0da3c07f02eb251851bb6cf260d primaryExpression literalConstant IntegerLiteral("0") - semis - SEMICOLON(";") + SEMICOLON(";") RCURL("}") semis NL("\n") @@ -437,8 +436,7 @@ File: PropertiesFollowedByInitializers.kt - 4321c0da3c07f02eb251851bb6cf260d primaryExpression literalConstant IntegerLiteral("0") - semis - SEMICOLON(";") + SEMICOLON(";") classMemberDeclaration declaration propertyDeclaration diff --git a/grammar/testData/psi/WhenWithSubjectVariable_ERR.antlrtree.txt b/grammar/testData/psi/WhenWithSubjectVariable_ERR.antlrtree.txt index 83058f4c6..4b7ddbf0e 100644 --- a/grammar/testData/psi/WhenWithSubjectVariable_ERR.antlrtree.txt +++ b/grammar/testData/psi/WhenWithSubjectVariable_ERR.antlrtree.txt @@ -112,12 +112,12 @@ File: WhenWithSubjectVariable_ERR.kt - 7ae4532609511d8f665bf00f8e48290b primaryExpression literalConstant IntegerLiteral("1") + SEMICOLON(";") + IntegerLiteral("42") + RPAREN(")") semis - SEMICOLON(";") - IntegerLiteral("42") - RPAREN(")") - NL("\n") - NL("\n") + NL("\n") + NL("\n") WHEN("when") LPAREN("(") topLevelObject diff --git a/grammar/testData/psi/examples/AnonymousObjects.antlrtree.txt b/grammar/testData/psi/examples/AnonymousObjects.antlrtree.txt index 2fcec6727..f96f09c4a 100644 --- a/grammar/testData/psi/examples/AnonymousObjects.antlrtree.txt +++ b/grammar/testData/psi/examples/AnonymousObjects.antlrtree.txt @@ -105,10 +105,9 @@ File: AnonymousObjects.kt - cb1b79406ee5e6a84aa4a81e7929b91f primaryExpression literalConstant IntegerLiteral("0") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration @@ -433,9 +432,8 @@ File: AnonymousObjects.kt - cb1b79406ee5e6a84aa4a81e7929b91f semis NL("\n") RCURL("}") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") RCURL("}") EOF("") diff --git a/grammar/testData/psi/examples/Graph.antlrtree.txt b/grammar/testData/psi/examples/Graph.antlrtree.txt index b4bd11178..c37a842e7 100644 --- a/grammar/testData/psi/examples/Graph.antlrtree.txt +++ b/grammar/testData/psi/examples/Graph.antlrtree.txt @@ -296,9 +296,8 @@ File: Graph.kt - e0394805947710471312885bf406c31e primaryExpression simpleIdentifier Identifier("mutableEdges") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") classMemberDeclaration declaration propertyDeclaration @@ -360,10 +359,9 @@ File: Graph.kt - e0394805947710471312885bf406c31e primaryExpression simpleIdentifier Identifier("mutableVertices") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration diff --git a/grammar/testData/psi/examples/Stack.antlrtree.txt b/grammar/testData/psi/examples/Stack.antlrtree.txt index 94cae483c..10000250e 100644 --- a/grammar/testData/psi/examples/Stack.antlrtree.txt +++ b/grammar/testData/psi/examples/Stack.antlrtree.txt @@ -81,10 +81,9 @@ File: Stack.kt - 8083210fa16dce03ac1b1089a1e37f65 valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration diff --git a/grammar/testData/psi/examples/UnionFind.antlrtree.txt b/grammar/testData/psi/examples/UnionFind.antlrtree.txt index ad4225d13..a9ddc5629 100644 --- a/grammar/testData/psi/examples/UnionFind.antlrtree.txt +++ b/grammar/testData/psi/examples/UnionFind.antlrtree.txt @@ -274,8 +274,8 @@ File: UnionFind.kt - 1f3b7dba30427b50522887bcbabbea15 simpleIdentifier Identifier("x") RSQUARE("]") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement expression @@ -430,8 +430,8 @@ File: UnionFind.kt - 1f3b7dba30427b50522887bcbabbea15 simpleIdentifier Identifier("p") RPAREN(")") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement assignment diff --git a/grammar/testData/psi/examples/collections/IIterator.antlrtree.txt b/grammar/testData/psi/examples/collections/IIterator.antlrtree.txt index 4b92896df..bf2858cc7 100644 --- a/grammar/testData/psi/examples/collections/IIterator.antlrtree.txt +++ b/grammar/testData/psi/examples/collections/IIterator.antlrtree.txt @@ -635,8 +635,8 @@ File: IIterator.kt - 6b9063f779102f98742e7cd367f3162e primaryExpression literalConstant IntegerLiteral("0") + SEMICOLON(";") semis - SEMICOLON(";") NL("\n") statement loopStatement diff --git a/grammar/testData/psi/propertyDelegate/DelegateAndInitializer.antlrtree.txt b/grammar/testData/psi/propertyDelegate/DelegateAndInitializer.antlrtree.txt index d8cde195c..317f4ff56 100644 --- a/grammar/testData/psi/propertyDelegate/DelegateAndInitializer.antlrtree.txt +++ b/grammar/testData/psi/propertyDelegate/DelegateAndInitializer.antlrtree.txt @@ -140,8 +140,7 @@ File: DelegateAndInitializer.kt - 18db3e03820ce39111adb5fb9e33e8c9 valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") + SEMICOLON(";") ASSIGNMENT("=") IntegerLiteral("3") NL("\n") diff --git a/grammar/testData/psi/propertyDelegate/GetterInSameLine.antlrtree.txt b/grammar/testData/psi/propertyDelegate/GetterInSameLine.antlrtree.txt index cd4c51079..733761814 100644 --- a/grammar/testData/psi/propertyDelegate/GetterInSameLine.antlrtree.txt +++ b/grammar/testData/psi/propertyDelegate/GetterInSameLine.antlrtree.txt @@ -33,8 +33,7 @@ File: GetterInSameLine.kt - d95e9524e9ae96b8343b94232000b73a valueArguments LPAREN("(") RPAREN(")") - semi - SEMICOLON(";") + SEMICOLON(";") getter GET("get") LPAREN("(") diff --git a/grammar/testData/psi/propertyDelegate/TwoProperties.antlrtree.txt b/grammar/testData/psi/propertyDelegate/TwoProperties.antlrtree.txt index fd0887b82..bfb86dc9f 100644 --- a/grammar/testData/psi/propertyDelegate/TwoProperties.antlrtree.txt +++ b/grammar/testData/psi/propertyDelegate/TwoProperties.antlrtree.txt @@ -33,8 +33,7 @@ File: TwoProperties.kt - 18e817286454fc30112ced104053eb6f valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") + SEMICOLON(";") topLevelObject declaration propertyDeclaration @@ -67,7 +66,6 @@ File: TwoProperties.kt - 18e817286454fc30112ced104053eb6f valueArguments LPAREN("(") RPAREN(")") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") EOF("") diff --git a/grammar/testData/psi/semicolonBetweenDeclarations.antlrtree.txt b/grammar/testData/psi/semicolonBetweenDeclarations.antlrtree.txt index 28249708f..44a667115 100644 --- a/grammar/testData/psi/semicolonBetweenDeclarations.antlrtree.txt +++ b/grammar/testData/psi/semicolonBetweenDeclarations.antlrtree.txt @@ -95,10 +95,9 @@ File: semicolonBetweenDeclarations.kt - 5aaf98ed0f36443e019c2cddff4cca0a primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") - NL("\n") + SEMICOLON(";") + NL("\n") + NL("\n") classMemberDeclaration declaration functionDeclaration @@ -148,9 +147,8 @@ File: semicolonBetweenDeclarations.kt - 5aaf98ed0f36443e019c2cddff4cca0a primaryExpression literalConstant IntegerLiteral("1") - semis - SEMICOLON(";") - NL("\n") + SEMICOLON(";") + NL("\n") RCURL("}") semis NL("\n") From b7e13e26294f954b69e34b6b0af54f0e0e563879 Mon Sep 17 00:00:00 2001 From: Marat Akhin Date: Fri, 28 Jul 2023 11:10:24 +0200 Subject: [PATCH 22/22] Prepare for 1.9 Kotlin spec release --- docs/src/md/commands.md | 2 +- docs/src/md/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/md/commands.md b/docs/src/md/commands.md index 4e4659909..316e715ea 100644 --- a/docs/src/md/commands.md +++ b/docs/src/md/commands.md @@ -1,6 +1,6 @@ <#mode quote> -\newcommand{\currentKotlinMajorVersion}{\textrm{1.8}} +\newcommand{\currentKotlinMajorVersion}{\textrm{1.9}} \newcommand{\opMathTT}[2]{% \expandafter\newcommand{#1}{\operatorname{\texttt{#2}}}% diff --git a/docs/src/md/index.md b/docs/src/md/index.md index bf7846ad2..7521a0f4a 100644 --- a/docs/src/md/index.md +++ b/docs/src/md/index.md @@ -4,7 +4,7 @@ title: Kotlin language specification author: - Marat Akhin - Mikhail Belyaev -subtitle: Version 1.8-rfc+0.1 +subtitle: Version 1.9-rfc+0.1 --- <#include "commands.md">