Drop obsolete annotations syntax
This commit is contained in:
@@ -72,7 +72,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
// Prefix
|
||||
MINUS, PLUS, MINUSMINUS, PLUSPLUS,
|
||||
EXCL, EXCLEXCL, // Joining complex tokens makes it necessary to put EXCLEXCL here
|
||||
LBRACKET,
|
||||
// Atomic
|
||||
|
||||
COLONCOLON, // callable reference
|
||||
@@ -121,7 +120,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
EXPRESSION_FIRST,
|
||||
TokenSet.create(
|
||||
// declaration
|
||||
LBRACKET, // annotation
|
||||
FUN_KEYWORD,
|
||||
VAL_KEYWORD, VAR_KEYWORD,
|
||||
TRAIT_KEYWORD,
|
||||
@@ -343,7 +341,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
private void parsePrefixExpression() {
|
||||
// System.out.println("pre at " + myBuilder.getTokenText());
|
||||
|
||||
if (at(LBRACKET) || at(AT)) {
|
||||
if (at(AT)) {
|
||||
if (!parseLocalDeclaration()) {
|
||||
PsiBuilder.Marker expression = mark();
|
||||
myJetParsing.parseAnnotations(ONLY_ESCAPED_REGULAR_ANNOTATIONS);
|
||||
|
||||
@@ -453,8 +453,8 @@ public class JetParsing extends AbstractJetParsing {
|
||||
else if (tryParseModifier(tokenConsumer)) {
|
||||
// modifier advanced
|
||||
}
|
||||
else if (at(LBRACKET) || (annotationParsingMode.allowShortAnnotations && at(IDENTIFIER))) {
|
||||
parseAnnotation(annotationParsingMode);
|
||||
else if (annotationParsingMode.allowShortAnnotations && at(IDENTIFIER)) {
|
||||
parseAnnotationEntry(annotationParsingMode);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
@@ -534,10 +534,7 @@ public class JetParsing extends AbstractJetParsing {
|
||||
* ;
|
||||
*/
|
||||
private boolean parseAnnotation(AnnotationParsingMode mode) {
|
||||
if (at(LBRACKET)) {
|
||||
return parseAnnotationList(mode, false);
|
||||
}
|
||||
else if (mode.allowShortAnnotations && at(IDENTIFIER)) {
|
||||
if (mode.allowShortAnnotations && at(IDENTIFIER)) {
|
||||
return parseAnnotationEntry(mode);
|
||||
}
|
||||
else if (at(AT)) {
|
||||
@@ -559,7 +556,7 @@ public class JetParsing extends AbstractJetParsing {
|
||||
return parseAnnotationEntry(mode);
|
||||
}
|
||||
else if (tokenToMatch == LBRACKET) {
|
||||
return parseAnnotationList(mode, true);
|
||||
return parseAnnotationList(mode);
|
||||
}
|
||||
else {
|
||||
if (isTargetedAnnotation) {
|
||||
@@ -580,14 +577,13 @@ public class JetParsing extends AbstractJetParsing {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean parseAnnotationList(AnnotationParsingMode mode, boolean expectAtSymbol) {
|
||||
assert !expectAtSymbol || _at(AT);
|
||||
assert expectAtSymbol || _at(LBRACKET);
|
||||
private boolean parseAnnotationList(AnnotationParsingMode mode) {
|
||||
assert _at(AT);
|
||||
PsiBuilder.Marker annotation = mark();
|
||||
|
||||
myBuilder.disableNewlines();
|
||||
|
||||
advance(); // AT or LBRACKET
|
||||
advance(); // AT
|
||||
|
||||
if (!parseAnnotationTargetIfNeeded(mode)) {
|
||||
annotation.rollbackTo();
|
||||
@@ -595,10 +591,8 @@ public class JetParsing extends AbstractJetParsing {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (expectAtSymbol) {
|
||||
assert _at(LBRACKET);
|
||||
advance(); // LBRACKET
|
||||
}
|
||||
assert _at(LBRACKET);
|
||||
advance(); // LBRACKET
|
||||
|
||||
if (!at(IDENTIFIER) && !at(AT)) {
|
||||
error("Expecting a list of annotations");
|
||||
@@ -1389,7 +1383,7 @@ public class JetParsing extends AbstractJetParsing {
|
||||
|
||||
if (!at(LPAR)) {
|
||||
// Account for Jet-114 (val a : int get {...})
|
||||
TokenSet ACCESSOR_FIRST_OR_PROPERTY_END = TokenSet.orSet(MODIFIER_KEYWORDS, TokenSet.create(LBRACKET, AT, GET_KEYWORD, SET_KEYWORD, EOL_OR_SEMICOLON, RBRACE));
|
||||
TokenSet ACCESSOR_FIRST_OR_PROPERTY_END = TokenSet.orSet(MODIFIER_KEYWORDS, TokenSet.create(AT, GET_KEYWORD, SET_KEYWORD, EOL_OR_SEMICOLON, RBRACE));
|
||||
if (!atSet(ACCESSOR_FIRST_OR_PROPERTY_END)) {
|
||||
errorUntil("Accessor body expected", TokenSet.orSet(ACCESSOR_FIRST_OR_PROPERTY_END, TokenSet.create(LBRACE, LPAR, EQ)));
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
[file:volatile]
|
||||
@file:[volatile]
|
||||
/**
|
||||
* Doc comment
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
JetFile: DocCommentAfterFileAnnotations.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
@@ -31,4 +32,4 @@ JetFile: DocCommentAfterFileAnnotations.kt
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
dynamic class dynamic<dynamic>(dynamic: dynamic) : dynamic {
|
||||
[dynamic] fun dynamic() {
|
||||
@dynamic fun dynamic() {
|
||||
val dynamic = 1
|
||||
dynamic::foo
|
||||
}
|
||||
|
||||
+7
-9
@@ -45,15 +45,13 @@ JetFile: DynamicSoftKeyword.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('dynamic')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('dynamic')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
fun foo(
|
||||
p1: dynamic,
|
||||
p2: [a] dynamic,
|
||||
p2: @a dynamic,
|
||||
p3: foo.dynamic,
|
||||
p4: dynamic.foo,
|
||||
p5: dynamic<T>,
|
||||
|
||||
+7
-9
@@ -24,15 +24,13 @@ JetFile: DynamicTypes.kt
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
DYNAMIC_TYPE
|
||||
PsiElement(dynamic)('dynamic')
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ fun foo() {
|
||||
typealias x = t
|
||||
var r
|
||||
|
||||
[a] var foo = 4
|
||||
@a var foo = 4
|
||||
|
||||
1
|
||||
[a] val f
|
||||
@a val f
|
||||
}
|
||||
+15
-19
@@ -51,15 +51,13 @@ JetFile: EOLsOnRollback.kt
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -75,18 +73,16 @@ JetFile: EOLsOnRollback.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+13
-13
@@ -1,37 +1,37 @@
|
||||
val a = fun ()
|
||||
val a = fun name()
|
||||
val a = fun T.name()
|
||||
val a = fun [a] T.(a : foo) : bar
|
||||
val a = fun [a] T.name(a : foo) : bar
|
||||
val a = fun [a()] T.<T : (a) -> b>(a : foo) : bar
|
||||
val a = fun @[a] T.(a : foo) : bar
|
||||
val a = fun @[a] T.name(a : foo) : bar
|
||||
val a = fun @[a()] T.<T : (a) -> b>(a : foo) : bar
|
||||
|
||||
fun c() = fun ();
|
||||
fun c() = fun name();
|
||||
fun c() = fun [a] T.();
|
||||
fun c() = fun [a] T.(a : foo) : bar;
|
||||
fun c() = fun [a()] T.<T : (a) -> b>(a : foo) : bar;
|
||||
fun c() = fun @[a] T.();
|
||||
fun c() = fun @[a] T.(a : foo) : bar;
|
||||
fun c() = fun @[a()] T.<T : (a) -> b>(a : foo) : bar;
|
||||
|
||||
val d = fun () = a
|
||||
val d = fun name() = a
|
||||
val a = [a] fun ()
|
||||
val a = @[a] fun ()
|
||||
|
||||
val b = fun <T> () where T: A
|
||||
|
||||
fun outer() {
|
||||
bar(fun () {})
|
||||
bar(fun name() {})
|
||||
bar(fun [a] T.() {})
|
||||
bar(fun [a] T.name() {})
|
||||
bar(fun @[a] T.() {})
|
||||
bar(fun @[a] T.name() {})
|
||||
|
||||
bar(fun [a] T.(a : foo) : bar {})
|
||||
bar(fun [a()] T.<T : (a) -> b>(a : foo) : bar {})
|
||||
bar(fun @[a] T.(a : foo) : bar {})
|
||||
bar(fun @[a()] T.<T : (a) -> b>(a : foo) : bar {})
|
||||
|
||||
bar {fun [a()] T.<T : [a] (a) -> b>(a : foo) : bar {}}
|
||||
bar {fun @[a()] T.<T : @[a] (a) -> b>(a : foo) : bar {}}
|
||||
|
||||
bar {fun A?.() : bar?}
|
||||
bar {fun A? .() : bar?}
|
||||
|
||||
bar(fun () = a)
|
||||
bar(fun name() = a)
|
||||
bar([a] fun name() = a)
|
||||
bar(@[a] fun name() = a)
|
||||
}
|
||||
|
||||
+14
@@ -64,6 +64,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -109,6 +110,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -155,6 +157,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -268,6 +271,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -301,6 +305,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -350,6 +355,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -461,6 +467,7 @@ JetFile: FunctionExpressions.kt
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -568,6 +575,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -601,6 +609,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -635,6 +644,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -684,6 +694,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -764,6 +775,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -789,6 +801,7 @@ JetFile: FunctionExpressions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -955,6 +968,7 @@ JetFile: FunctionExpressions.kt
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
val a = fun )
|
||||
val a = fun foo)
|
||||
|
||||
val a = fun [a] T.foo(a : ) : bar
|
||||
val a = fun @[a] T.foo(a : ) : bar
|
||||
|
||||
val a = fun [a()] T.foo<>(a : foo) : bar
|
||||
val a = fun [a()] T.<>(a : foo) : bar
|
||||
val a = fun @[a()] T.foo<>(a : foo) : bar
|
||||
val a = fun @[a()] T.<>(a : foo) : bar
|
||||
|
||||
val a = fun T.foo<T, , T>(a : foo) : bar
|
||||
val a = fun T.foo<, T, , T>(a : foo) : bar
|
||||
@@ -24,7 +24,7 @@ fun outer() {
|
||||
|
||||
bar(fun T)
|
||||
bar(fun T.)
|
||||
bar(fun [a])
|
||||
bar(fun @[a])
|
||||
|
||||
|
||||
bar(public fun ())
|
||||
|
||||
@@ -46,6 +46,7 @@ JetFile: FunctionExpressions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -91,6 +92,7 @@ JetFile: FunctionExpressions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -145,6 +147,7 @@ JetFile: FunctionExpressions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -546,6 +549,7 @@ JetFile: FunctionExpressions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ fun foo() {
|
||||
{T.(a) : T -> a}
|
||||
|
||||
{x, y -> 1}
|
||||
{[a] x, [b] y, [c] z -> 1}
|
||||
{@[a] x, @[b] y, @[c] z -> 1}
|
||||
|
||||
{((a: Int = object { fun t() {} }) -> Int).(x: Int) : String -> "" }
|
||||
{ A.B<String>.(x: Int) -> }
|
||||
|
||||
+3
@@ -463,6 +463,7 @@ JetFile: FunctionLiterals.kt
|
||||
BLOCK
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -477,6 +478,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RBRACKET)(']')
|
||||
@@ -484,6 +486,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(IDENTIFIER)('y')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RBRACKET)(']')
|
||||
|
||||
+7
-7
@@ -1,14 +1,14 @@
|
||||
typealias f = ([a] a) -> b
|
||||
typealias f = (@[a] a) -> b
|
||||
typealias f = (a) -> b
|
||||
typealias f = () -> [x] b
|
||||
typealias f = () -> @[x] b
|
||||
typealias f = () -> Unit
|
||||
|
||||
typealias f = (a : [a] a) -> b
|
||||
typealias f = (a : @[a] a) -> b
|
||||
typealias f = (a : a) -> b
|
||||
typealias f = () -> b
|
||||
typealias f = () -> Unit
|
||||
|
||||
typealias f = (a : [a] a, foo, x : bar) -> b
|
||||
typealias f = (a : @[a] a, foo, x : bar) -> b
|
||||
typealias f = (foo, a : a) -> b
|
||||
typealias f = (foo, a : (a) -> b) -> b
|
||||
typealias f = (foo, a : (a) -> b) -> () -> Unit
|
||||
@@ -19,6 +19,6 @@ typealias f = T.() -> Unit
|
||||
typealias f = T.T.() -> Unit
|
||||
typealias f = T<A, B>.T<x>.() -> Unit
|
||||
|
||||
typealias f = [a] T.() -> Unit
|
||||
typealias f = [a] T.T.() -> Unit
|
||||
typealias f = [a] T<A, B>.T<x>.() -> Unit
|
||||
typealias f = @[a] T.() -> Unit
|
||||
typealias f = @[a] T.T.() -> Unit
|
||||
typealias f = @[a] T<A, B>.T<x>.() -> Unit
|
||||
|
||||
+7
@@ -17,6 +17,7 @@ JetFile: FunctionTypes.kt
|
||||
VALUE_PARAMETER
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -81,6 +82,7 @@ JetFile: FunctionTypes.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -132,6 +134,7 @@ JetFile: FunctionTypes.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -240,6 +243,7 @@ JetFile: FunctionTypes.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -544,6 +548,7 @@ JetFile: FunctionTypes.kt
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -580,6 +585,7 @@ JetFile: FunctionTypes.kt
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -620,6 +626,7 @@ JetFile: FunctionTypes.kt
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
Vendored
+13
-13
@@ -1,22 +1,22 @@
|
||||
fun foo()
|
||||
fun [a] foo()
|
||||
fun [a] T.foo()
|
||||
fun [a] T.foo(a : foo) : bar
|
||||
fun [a()] T.foo<T : (a) -> b>(a : foo) : bar
|
||||
fun @[a] foo()
|
||||
fun @[a] T.foo()
|
||||
fun @[a] T.foo(a : foo) : bar
|
||||
fun @[a()] T.foo<T : (a) -> b>(a : foo) : bar
|
||||
|
||||
fun foo();
|
||||
fun [a] foo();
|
||||
fun [a] T.foo();
|
||||
fun [a] T.foo(a : foo) : bar;
|
||||
fun [a()] T.foo<T : (a) -> b>(a : foo) : bar;
|
||||
fun @[a] foo();
|
||||
fun @[a] T.foo();
|
||||
fun @[a] T.foo(a : foo) : bar;
|
||||
fun @[a()] T.foo<T : (a) -> b>(a : foo) : bar;
|
||||
|
||||
fun foo() {}
|
||||
fun [a] foo() {}
|
||||
fun [a] T.foo() {}
|
||||
fun [a] T.foo(a : foo) : bar {}
|
||||
fun [a()] T.foo<T : (a) -> b>(a : foo) : bar {}
|
||||
fun @[a] foo() {}
|
||||
fun @[a] T.foo() {}
|
||||
fun @[a] T.foo(a : foo) : bar {}
|
||||
fun @[a()] T.foo<T : (a) -> b>(a : foo) : bar {}
|
||||
|
||||
fun [a()] T.foo<T : [a] (a) -> b>(a : foo) : bar {}
|
||||
fun @[a()] T.foo<T : @[a] (a) -> b>(a : foo) : bar {}
|
||||
|
||||
fun A?.foo() : bar?
|
||||
fun A? .foo() : bar?
|
||||
|
||||
Vendored
+14
@@ -16,6 +16,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -35,6 +36,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -58,6 +60,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -97,6 +100,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -173,6 +177,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -193,6 +198,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -217,6 +223,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -257,6 +264,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -337,6 +345,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -360,6 +369,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -387,6 +397,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -430,6 +441,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -501,6 +513,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -527,6 +540,7 @@ JetFile: Functions.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+4
-4
@@ -9,10 +9,10 @@ fun T.(a : foo) : bar;
|
||||
fun T.<T : (a) -> b>(a : foo) : bar;
|
||||
|
||||
fun () {}
|
||||
fun [a] T.() {}
|
||||
fun [a] T.(a : foo) : bar {}
|
||||
fun [a()] T.<T : (a) -> b>(a : foo) : bar {}
|
||||
fun [a()] T.<T : [a] (a) -> b>(a : foo) : bar {}
|
||||
fun @[a] T.() {}
|
||||
fun @[a] T.(a : foo) : bar {}
|
||||
fun @[a()] T.<T : (a) -> b>(a : foo) : bar {}
|
||||
fun @[a()] T.<T : @[a] (a) -> b>(a : foo) : bar {}
|
||||
|
||||
fun A?.() : bar?
|
||||
fun A? .() : bar?
|
||||
@@ -223,6 +223,7 @@ JetFile: FunctionsWithoutName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -249,6 +250,7 @@ JetFile: FunctionsWithoutName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -291,6 +293,7 @@ JetFile: FunctionsWithoutName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -361,6 +364,7 @@ JetFile: FunctionsWithoutName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -386,6 +390,7 @@ JetFile: FunctionsWithoutName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
fun )
|
||||
fun [a] T.(a : ) : bar
|
||||
fun [a()] T.<>(a : foo) : bar
|
||||
fun [a()] T.<T, , T>(a : foo) : bar
|
||||
fun [a()] T.<, T, , T>(a : foo) : bar
|
||||
fun [a()] T.<T, T>(, a : foo, , a: b) : bar
|
||||
fun @[a] T.(a : ) : bar
|
||||
fun @[a()] T.<>(a : foo) : bar
|
||||
fun @[a()] T.<T, , T>(a : foo) : bar
|
||||
fun @[a()] T.<, T, , T>(a : foo) : bar
|
||||
fun @[a()] T.<T, T>(, a : foo, , a: b) : bar
|
||||
|
||||
fun () : = a;
|
||||
@@ -16,6 +16,7 @@ JetFile: FunctionsWithoutName_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -53,6 +54,7 @@ JetFile: FunctionsWithoutName_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -99,6 +101,7 @@ JetFile: FunctionsWithoutName_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -152,6 +155,7 @@ JetFile: FunctionsWithoutName_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -208,6 +212,7 @@ JetFile: FunctionsWithoutName_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
fun foo)
|
||||
fun [a] T.foo(a : ) : bar
|
||||
fun [a()] T.foo<>(a : foo) : bar
|
||||
fun [a()] T.foo<T, , T>(a : foo) : bar
|
||||
fun [a()] T.foo<, T, , T>(a : foo) : bar
|
||||
fun [a()] T.foo<T, T>(, a : foo, , a: b) : bar
|
||||
fun @[a] T.foo(a : ) : bar
|
||||
fun @[a()] T.foo<>(a : foo) : bar
|
||||
fun @[a()] T.foo<T, , T>(a : foo) : bar
|
||||
fun @[a()] T.foo<, T, , T>(a : foo) : bar
|
||||
fun @[a()] T.foo<T, T>(, a : foo, , a: b) : bar
|
||||
|
||||
fun foo() : = a;
|
||||
fun foo() = ;
|
||||
+5
@@ -17,6 +17,7 @@ JetFile: Functions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -55,6 +56,7 @@ JetFile: Functions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -102,6 +104,7 @@ JetFile: Functions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -156,6 +159,7 @@ JetFile: Functions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -213,6 +217,7 @@ JetFile: Functions_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[file:volatile]
|
||||
@file:[volatile]
|
||||
// class C
|
||||
class C{}
|
||||
@@ -1,9 +1,10 @@
|
||||
JetFile: LineCommentAfterFileAnnotations.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
fun foo() {
|
||||
out
|
||||
1
|
||||
[a] abstract class foof {}
|
||||
abstract [a] class foof {}
|
||||
@a abstract class foof {}
|
||||
abstract @a class foof {}
|
||||
|
||||
out val foo = 5
|
||||
[a] var foo = 4
|
||||
@a var foo = 4
|
||||
typealias f = T.() -> Unit
|
||||
|
||||
}
|
||||
|
||||
+21
-27
@@ -22,15 +22,13 @@ JetFile: LocalDeclarations.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(abstract)('abstract')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -46,15 +44,13 @@ JetFile: LocalDeclarations.kt
|
||||
MODIFIER_LIST
|
||||
PsiElement(abstract)('abstract')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -79,15 +75,13 @@ JetFile: LocalDeclarations.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
Vendored
+2
-2
@@ -1,11 +1,11 @@
|
||||
val foo = bar.foo.bar
|
||||
|
||||
val foo
|
||||
val [a] foo
|
||||
val @[a] foo
|
||||
val foo.bar
|
||||
|
||||
val foo : T
|
||||
val [a] foo = bar
|
||||
val @[a] foo = bar
|
||||
val foo.bar
|
||||
get() {}
|
||||
set(sad) = foo
|
||||
|
||||
Vendored
+2
@@ -31,6 +31,7 @@ JetFile: Properties.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -69,6 +70,7 @@ JetFile: Properties.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -13,8 +13,8 @@ class Foo() {
|
||||
}
|
||||
|
||||
var b5 : Int get abstract set
|
||||
var b6 : Int get [a] abstract set
|
||||
var b7 : Int get [a] abstract {}
|
||||
var b6 : Int get @[a] abstract set
|
||||
var b7 : Int get @[a] abstract {}
|
||||
var b8 : Int get @a abstract set
|
||||
var b9 : Int get @a abstract {}
|
||||
}
|
||||
|
||||
@@ -227,6 +227,7 @@ JetFile: PropertiesFollowedByInitializers.kt
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -256,6 +257,7 @@ JetFile: PropertiesFollowedByInitializers.kt
|
||||
PsiElement(get)('get')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Property getter or setter expected
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
|
||||
+2
-2
@@ -4,10 +4,10 @@ var f :
|
||||
val foo :
|
||||
val :
|
||||
val : Int
|
||||
val [a foo = foo
|
||||
val @[a foo = foo
|
||||
val foo.bar.
|
||||
val foo.
|
||||
val [a] foo : = bar
|
||||
val @a foo : = bar
|
||||
val foo.bar
|
||||
public () {}
|
||||
() = foo
|
||||
|
||||
+8
-9
@@ -79,6 +79,7 @@ JetFile: Properties_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -131,15 +132,13 @@ JetFile: Properties_ERR.kt
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
[`return`] fun `package`() {
|
||||
@`return` fun `package`() {
|
||||
`class`()
|
||||
}
|
||||
|
||||
|
||||
+7
-9
@@ -5,15 +5,13 @@ JetFile: QuotedIdentifiers.kt
|
||||
<empty list>
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('`return`')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('`return`')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
fun <A, B> foo()
|
||||
fun <A, B> [a] foo()
|
||||
fun <A, B> [a] T.foo()
|
||||
fun <A, B> @[a] foo()
|
||||
fun <A, B> @[a] T.foo()
|
||||
|
||||
val <A> List<A>.foo
|
||||
var <A> List<A>.foo
|
||||
@@ -36,6 +36,7 @@ JetFile: TypeParametersBeforeName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Annotations are not allowed in this position
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -65,6 +66,7 @@ JetFile: TypeParametersBeforeName.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun foo() {
|
||||
[a] foo
|
||||
@[a] foo
|
||||
1
|
||||
[a] this
|
||||
@[a] this
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ JetFile: AnnotatedExpressions.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -33,6 +34,7 @@ JetFile: AnnotatedExpressions.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+7
-7
@@ -12,24 +12,24 @@ private
|
||||
protected
|
||||
public
|
||||
internal
|
||||
[foo<A, B>(a, b) ina foo.bar.goo.doo<f>.foo<bar, goo>.foo]
|
||||
[df]
|
||||
@[foo<A, B>(a, b) ina foo.bar.goo.doo<f>.foo<bar, goo>.foo]
|
||||
@[df]
|
||||
in
|
||||
[sdfsdf]
|
||||
@[sdfsdf]
|
||||
out
|
||||
ref
|
||||
class Bar<abstract
|
||||
open
|
||||
[sdfsdf(1+1) a]
|
||||
[sdfsdf(1+1)]
|
||||
[a() sdfsdf(1+1)]
|
||||
@[sdfsdf(1+1) a]
|
||||
@[sdfsdf(1+1)]
|
||||
@[a() sdfsdf(1+1)]
|
||||
enum
|
||||
open
|
||||
annotation
|
||||
override
|
||||
open
|
||||
abstract
|
||||
[sdfsd sdfsd a.b.f.c]
|
||||
@[sdfsd sdfsd a.b.f.c]
|
||||
private
|
||||
protected
|
||||
public
|
||||
|
||||
@@ -42,6 +42,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(internal)('internal')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -135,6 +136,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -147,6 +149,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -177,6 +180,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -205,6 +209,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -226,6 +231,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -269,6 +275,7 @@ JetFile: Annotations.kt
|
||||
PsiElement(abstract)('abstract')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fun foo() {
|
||||
|
||||
when (e) {
|
||||
is [a] T -> d
|
||||
is @[a] T -> d
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ JetFile: AnnotationsOnPatterns.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+6
-6
@@ -8,16 +8,16 @@ annotation
|
||||
override
|
||||
open
|
||||
abstract
|
||||
[]
|
||||
@[]
|
||||
private
|
||||
protected
|
||||
public
|
||||
internal
|
||||
[foo<A, B>(a, b), ina foo.bar.goo.doo<f>.foo<bar, goo>.foo]
|
||||
[df]
|
||||
@[foo<A, B>(a, b), ina foo.bar.goo.doo<f>.foo<bar, goo>.foo]
|
||||
@[df]
|
||||
in
|
||||
[sdfsdf ]
|
||||
[s fd d, ]
|
||||
@[sdfsdf ]
|
||||
@[s fd d, ]
|
||||
out
|
||||
ref
|
||||
class Bar<abstract
|
||||
@@ -28,7 +28,7 @@ annotation
|
||||
override
|
||||
open
|
||||
abstract
|
||||
[sdfsd sdfsd a.b.f.c]
|
||||
@[sdfsd sdfsd a.b.f.c]
|
||||
private
|
||||
protected
|
||||
public
|
||||
|
||||
@@ -34,6 +34,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiElement(abstract)('abstract')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:Expecting a list of annotations
|
||||
<empty list>
|
||||
@@ -48,6 +49,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiElement(internal)('internal')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -143,6 +145,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -155,6 +158,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -166,6 +170,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -225,6 +230,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiElement(abstract)('abstract')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
class F(a : [a] [b] B)
|
||||
class F(a : @[a] @[b] B)
|
||||
|
||||
typealias f = [b] [x] F<[x] A, B>
|
||||
typealias f = @[b] @[x] F<@[x] A, B>
|
||||
|
||||
class C : [a] B, [c d] E by F, [g] H(), [i] () -> Unit
|
||||
class C : @[a] B, @[c d] E by F, @[g] H(), @[i] () -> Unit
|
||||
|
||||
@@ -17,6 +17,7 @@ JetFile: TypeAnnotations.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -27,6 +28,7 @@ JetFile: TypeAnnotations.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -50,6 +52,7 @@ JetFile: TypeAnnotations.kt
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -60,6 +63,7 @@ JetFile: TypeAnnotations.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -77,6 +81,7 @@ JetFile: TypeAnnotations.kt
|
||||
TYPE_PROJECTION
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -110,6 +115,7 @@ JetFile: TypeAnnotations.kt
|
||||
DELEGATOR_SUPER_CLASS
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -127,6 +133,7 @@ JetFile: TypeAnnotations.kt
|
||||
DELEGATOR_BY
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -157,6 +164,7 @@ JetFile: TypeAnnotations.kt
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -177,6 +185,7 @@ JetFile: TypeAnnotations.kt
|
||||
DELEGATOR_SUPER_CLASS
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private @ [Ann1(1)] Ann3("2") class A(
|
||||
private @ @[Ann1(1)] Ann3("2") class A(
|
||||
@ private val x: Int,
|
||||
@ private var y: Int,
|
||||
@ open z: Int
|
||||
@@ -10,10 +10,10 @@ private @ [Ann1(1)] Ann3("2") class A(
|
||||
|
||||
@
|
||||
|
||||
[inline2] private
|
||||
@[inline2] private
|
||||
fun inlineLocal() {}
|
||||
|
||||
[Ann]
|
||||
@[Ann]
|
||||
private
|
||||
@
|
||||
@volatile var x = 1
|
||||
|
||||
@@ -11,6 +11,7 @@ JetFile: declarationsJustAtTyped.kt
|
||||
PsiElement(AT)('@')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -145,6 +146,7 @@ JetFile: declarationsJustAtTyped.kt
|
||||
PsiElement(AT)('@')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -170,6 +172,7 @@ JetFile: declarationsJustAtTyped.kt
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
enum class A {
|
||||
[Ann] @Ann(1) X : A()
|
||||
@[Ann] @Ann(1) X : A()
|
||||
|
||||
@Ann Y : A() {}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ JetFile: enumEntries.kt
|
||||
ENUM_ENTRY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -3,7 +3,7 @@ class A1 @Ann1("") ()
|
||||
class A2 @Ann2("")(x: Int) : B {
|
||||
}
|
||||
|
||||
class A3 [Ann3] private @(x: Int)
|
||||
class A4 [Ann4] @private @(x: Int)
|
||||
class A3 @[Ann3] private @(x: Int)
|
||||
class A4 @[Ann4] @private @(x: Int)
|
||||
class A5 private @Ann4(x: Int) : B
|
||||
class A6 [Ann5] @private @ [Ann6]()
|
||||
class A6 @[Ann5] @private @ @[Ann6]()
|
||||
|
||||
@@ -84,6 +84,7 @@ JetFile: primaryConstructor.kt
|
||||
PRIMARY_CONSTRUCTOR
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -117,6 +118,7 @@ JetFile: primaryConstructor.kt
|
||||
PRIMARY_CONSTRUCTOR
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -192,6 +194,7 @@ JetFile: primaryConstructor.kt
|
||||
PRIMARY_CONSTRUCTOR
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -207,6 +210,7 @@ JetFile: primaryConstructor.kt
|
||||
PsiElement(AT)('@')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -217,4 +221,4 @@ JetFile: primaryConstructor.kt
|
||||
PsiElement(RBRACKET)(']')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -1,19 +1,19 @@
|
||||
private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
|
||||
private @open @[Ann1(1)] @Ann2("1") Ann3("2") class A(
|
||||
@volatile(1) private val x: @AnnType("3") @open Int,
|
||||
@private var y: Int,
|
||||
@open z: Int
|
||||
) {
|
||||
@private [Ann3(2)] @Ann4("4") fun foo() {
|
||||
@private @[Ann3(2)] @Ann4("4") fun foo() {
|
||||
@data class LocalClass
|
||||
|
||||
print(1)
|
||||
|
||||
@inline(option1, option2)
|
||||
|
||||
[inline2] private
|
||||
@[inline2] private
|
||||
fun inlineLocal() {}
|
||||
|
||||
[Ann]
|
||||
@[Ann]
|
||||
private
|
||||
@abstract
|
||||
@volatile var x = 1
|
||||
@@ -22,7 +22,7 @@ private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
|
||||
}
|
||||
|
||||
val x: Int
|
||||
@inject [inline] private @open get() = 1
|
||||
@inject @[inline] private @open get() = 1
|
||||
|
||||
@open @ann init {}
|
||||
|
||||
@@ -35,7 +35,7 @@ private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
|
||||
@private
|
||||
constructor()
|
||||
|
||||
fun <@ann("") [ann] T : R> foo() {}
|
||||
fun <@ann("") @[ann] T : R> foo() {}
|
||||
}
|
||||
@private val x = 1
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ JetFile: validDeclarations.kt
|
||||
PsiElement(open)('@open')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -156,6 +157,7 @@ JetFile: validDeclarations.kt
|
||||
PsiElement(private)('@private')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -244,6 +246,7 @@ JetFile: validDeclarations.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -269,6 +272,7 @@ JetFile: validDeclarations.kt
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -365,6 +369,7 @@ JetFile: validDeclarations.kt
|
||||
PsiElement(IDENTIFIER)('inject')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -466,6 +471,7 @@ JetFile: validDeclarations.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ fun foo() {
|
||||
|
||||
label@simpleName
|
||||
|
||||
val x = @ann [ann] l@{
|
||||
val x = @ann @[ann] l@{
|
||||
a, b, c -> a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,6 +336,7 @@ JetFile: validExpressions.kt
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
fun foo() {
|
||||
for (@volatile x in z) {}
|
||||
|
||||
for ([ann]) {}
|
||||
for (@[ann]) {}
|
||||
for (@ in z) {}
|
||||
|
||||
for ((x, private data @ann [ann] y) in x) {}
|
||||
for ((x, private data @ann @[ann] y) in x) {}
|
||||
|
||||
for (([ann], x) in pair) {}
|
||||
for ((@[ann], x) in pair) {}
|
||||
|
||||
for (volatile x in 1..100) {}
|
||||
for (volatile(1) x in 1..100) {}
|
||||
|
||||
@@ -49,6 +49,7 @@ JetFile: forParameters.kt
|
||||
VALUE_PARAMETER
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -124,6 +125,7 @@ JetFile: forParameters.kt
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -157,6 +159,7 @@ JetFile: forParameters.kt
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@ fun foo() {
|
||||
print(2)
|
||||
}
|
||||
|
||||
bar @ann [ann] {
|
||||
bar @ann @[ann] {
|
||||
print(2)
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@ fun foo() {
|
||||
print(1)
|
||||
}
|
||||
|
||||
bar() [ann] {
|
||||
bar() @[ann] {
|
||||
print(2)
|
||||
}
|
||||
|
||||
bar() @ann [ann] {
|
||||
bar() @ann @[ann] {
|
||||
print(2)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ fun foo() {
|
||||
if (true) @ann {
|
||||
|
||||
}
|
||||
else [ann] @ann {
|
||||
else @[ann] @ann {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -91,6 +91,7 @@ JetFile: lambda.kt
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -161,6 +162,7 @@ JetFile: lambda.kt
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -205,6 +207,7 @@ JetFile: lambda.kt
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -292,6 +295,7 @@ JetFile: lambda.kt
|
||||
ELSE
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@ fun foo() {
|
||||
print(1)
|
||||
}
|
||||
|
||||
bar @ [ann] {
|
||||
bar @ @[ann] {
|
||||
print(2)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ fun foo() {
|
||||
print(1)
|
||||
}
|
||||
|
||||
bar() [] @ {
|
||||
bar() @[] @ {
|
||||
print(2)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ fun foo() {
|
||||
if (true) @ {
|
||||
|
||||
}
|
||||
else [ann] @ ann {
|
||||
else @[ann] @ ann {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -75,6 +75,7 @@ JetFile: lambdaRecovery.kt
|
||||
PsiElement(AT)('@')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -173,6 +174,7 @@ JetFile: lambdaRecovery.kt
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:Expecting a list of annotations
|
||||
<empty list>
|
||||
@@ -281,6 +283,7 @@ JetFile: lambdaRecovery.kt
|
||||
ELSE
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -306,4 +309,4 @@ JetFile: lambdaRecovery.kt
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
fun foo() {
|
||||
val (x, private data @ann [ann] y) = pair
|
||||
val ([ann], x) = pair
|
||||
val (x, private data @ann @[ann] y) = pair
|
||||
val (@[ann], x) = pair
|
||||
|
||||
@volatile val (@ann x, y) = 1
|
||||
@volatile val (@ann x, y = 1
|
||||
|
||||
@@ -42,6 +42,7 @@ JetFile: multiDeclaration.kt
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -66,6 +67,7 @@ JetFile: multiDeclaration.kt
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[data(1)] class A {
|
||||
fun foo() {
|
||||
[inline] fun bar() {
|
||||
return 1
|
||||
}
|
||||
|
||||
[suppress("1")] 1+1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
JetFile: oldAnnotationsRecovery.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(LBRACKET)('[')
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(LBRACKET)('[')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
BLOCK
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(LBRACKET)('[')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('suppress')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('1')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package bar
|
||||
|
||||
[file: foo]
|
||||
val prop
|
||||
|
||||
[file:bar baz]
|
||||
fun func() {}
|
||||
|
||||
[file:baz]
|
||||
class C
|
||||
|
||||
[file:]
|
||||
interface T
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
JetFile: fileAnnotationInWrongPlace.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n\n')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:File annotations are only allowed before package declaration
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('prop')
|
||||
PsiWhiteSpace('\n\n')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:File annotations are only allowed before package declaration
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('func')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:File annotations are only allowed before package declaration
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:File annotations are only allowed before package declaration
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiErrorElement:Expecting a list of annotations
|
||||
<empty list>
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(interface)('interface')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
@@ -1,3 +0,0 @@
|
||||
[file: foo]
|
||||
[file:bar baz]
|
||||
package bar
|
||||
@@ -1,41 +0,0 @@
|
||||
JetFile: manyAnnotationBlocks.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PACKAGE_DIRECTIVE
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
@@ -1,3 +0,0 @@
|
||||
[file: foo bar
|
||||
baz]
|
||||
package bar
|
||||
@@ -1,36 +0,0 @@
|
||||
JetFile: manyInOneAnnotationBlock.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PACKAGE_DIRECTIVE
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
[foo]
|
||||
[file bar]
|
||||
[file, baz]
|
||||
[file]
|
||||
[:foo.bar]
|
||||
[file:]
|
||||
[:]
|
||||
package boo
|
||||
-88
@@ -1,88 +0,0 @@
|
||||
JetFile: nonFIleAnnotationBeforePackage.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:Expecting "file:" prefix for file annotations
|
||||
<empty list>
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiErrorElement:Expecting "file:" prefix for file annotations
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiErrorElement:Expecting "file:" prefix for file annotations
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiErrorElement:Expecting "file:" prefix for file annotations
|
||||
<empty list>
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:Expected 'file' keyword before ':'
|
||||
PsiElement(COLON)(':')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiErrorElement:Expecting a list of annotations
|
||||
<empty list>
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:Expected 'file' keyword before ':'
|
||||
PsiElement(COLON)(':')
|
||||
PsiErrorElement:Expecting a list of annotations
|
||||
<empty list>
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PACKAGE_DIRECTIVE
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('boo')
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
@@ -1,2 +0,0 @@
|
||||
[file: foo]
|
||||
package bar
|
||||
@@ -1,22 +0,0 @@
|
||||
JetFile: single.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PACKAGE_DIRECTIVE
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
[ann] fun foo(): String? = null
|
||||
|
||||
annotation class ann
|
||||
Vendored
-44
@@ -1,44 +0,0 @@
|
||||
JetFile: withoutFileAnnotationAndPackageDeclaration.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
NULLABLE_TYPE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('String')
|
||||
PsiElement(QUEST)('?')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
NULL
|
||||
PsiElement(null)('null')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
@@ -1,4 +0,0 @@
|
||||
[file: foo]
|
||||
[foo bar]
|
||||
[file: baz]
|
||||
fun foo() {}
|
||||
@@ -1,62 +0,0 @@
|
||||
JetFile: withoutPackage.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:File annotations are only allowed before package declaration
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
[file: foo]
|
||||
foo bar
|
||||
[file: baz]
|
||||
fun foo() {}
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
JetFile: withoutPackageWithSimpleAnnotation.kt
|
||||
FILE_ANNOTATION_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiErrorElement:File annotations are only allowed before package declaration
|
||||
PsiElement(file)('file')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('baz')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
+1
-1
@@ -20,7 +20,7 @@ class BinaryTree<T> : IMutableSet<T> {
|
||||
constructor() : this(naturalOrder<T>()) {
|
||||
}
|
||||
|
||||
private [operator] fun T.compareTo(other : T) : Int = compare(this, other)
|
||||
private @[operator] fun T.compareTo(other : T) : Int = compare(this, other)
|
||||
|
||||
override fun contains(item : T) : Boolean {
|
||||
return contains(root, item)
|
||||
|
||||
@@ -246,6 +246,7 @@ JetFile: BinaryTree.kt
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ fun Int.matchMask(mask : Int) = this and mask == mask
|
||||
|
||||
open class INumber : IComparable<This> {
|
||||
val bits : Int
|
||||
[operator] fun plus(other : This) : This
|
||||
[operator] fun shl(bits : Int) : This
|
||||
@operator fun plus(other : This) : This
|
||||
@operator fun shl(bits : Int) : This
|
||||
// ...
|
||||
}
|
||||
+14
-18
@@ -557,15 +557,13 @@ JetFile: BitArith.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('operator')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('operator')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -590,15 +588,13 @@ JetFile: BitArith.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('operator')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('operator')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+3
-3
@@ -1,16 +1,16 @@
|
||||
val foo = object : AntBuilder() {
|
||||
|
||||
[lazy] val groovy = library {
|
||||
@lazy val groovy = library {
|
||||
classpath("$libs/groovy-...")
|
||||
}
|
||||
|
||||
[lazy] val gant = library {
|
||||
@lazy val gant = library {
|
||||
File("$gantHome/lib").files.each {
|
||||
classpath(it)
|
||||
}
|
||||
}
|
||||
|
||||
[lazy] val JPS = module {
|
||||
@lazy val JPS = module {
|
||||
targetLevel = "1.5"
|
||||
classpath(antLayout, gant, groovy)
|
||||
src("$projectHome/antLayout/src")
|
||||
|
||||
+21
-27
@@ -33,15 +33,13 @@ JetFile: Builder.kt
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -80,15 +78,13 @@ JetFile: Builder.kt
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -154,15 +150,13 @@ JetFile: Builder.kt
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
[inline] fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body()
|
||||
inline fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body()
|
||||
|
||||
fun example() {
|
||||
|
||||
|
||||
+6
-9
@@ -5,15 +5,12 @@ JetFile: With.kt
|
||||
<empty list>
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiElement(RBRACKET)(']')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@
|
||||
*/
|
||||
|
||||
open class ReadOnlyArray<out T> : ISized {
|
||||
[operator] fun get(index : Int) : T
|
||||
@[operator] fun get(index : Int) : T
|
||||
}
|
||||
|
||||
open class WriteOnlyArray<in T> : ISized { // This is needed to keep IIterator's <T> covariant
|
||||
[operator] fun set(index : Int, value : T)
|
||||
@[operator] fun set(index : Int, value : T)
|
||||
}
|
||||
|
||||
class MutableArray<T> : ReadOnlyArray<T>, WriteOnlyArray<T> {/*...*/}
|
||||
@@ -42,6 +42,7 @@ JetFile: MutableArray.kt
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -109,6 +110,7 @@ JetFile: MutableArray.kt
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ open class IMap<K, V> {
|
||||
class HashableWrapper(val obj : Any) : IHashable
|
||||
// equals and hashCode implementations are inherited
|
||||
|
||||
[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this)
|
||||
@[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this)
|
||||
|
||||
open class IHashingStrategy<K> {
|
||||
fun equals(a : K, b : K) : Boolean
|
||||
@@ -39,8 +39,8 @@ class JavaObjectHashingStrategy<K> : IHashingStrategy<K> {
|
||||
}
|
||||
|
||||
class HashMap<K, V> : IMap<K, V> {
|
||||
private [inline] fun hashCode(a : K) = a.hashable().hashCode
|
||||
private [inline] fun equals(a : K, b : K) = a.hashable() == b
|
||||
private @[inline] fun hashCode(a : K) = a.hashable().hashCode
|
||||
private @[inline] fun equals(a : K, b : K) = a.hashable() == b
|
||||
|
||||
// everything else uses these equals() and hashCode()...
|
||||
|
||||
|
||||
@@ -330,6 +330,7 @@ JetFile: HashMap.kt
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -764,6 +765,7 @@ JetFile: HashMap.kt
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
@@ -811,6 +813,7 @@ JetFile: HashMap.kt
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
open class IList<out T> : IIterable<T>, ISized {
|
||||
[operator] fun get(index : Int) : T
|
||||
@[operator] fun get(index : Int) : T
|
||||
val isEmpty : Boolean
|
||||
}
|
||||
@@ -49,6 +49,7 @@ JetFile: IList.kt
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
PsiElement(LBRACKET)('[')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user