diff --git a/grammar/src/types.grm b/grammar/src/types.grm
index 90c4d4e0076..9166ca8c65a 100644
--- a/grammar/src/types.grm
+++ b/grammar/src/types.grm
@@ -47,7 +47,7 @@ optionalProjection
;
functionType
- : "{" (type ".")? functionTypeContents "}"
+ : "fun" (type ".")? functionTypeContents
;
functionTypeContents
diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
index 3f93e4b2946..39252c64f51 100644
--- a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
+++ b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
@@ -791,7 +791,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
myJetParsing.parseAttributeList();
- if (at(NAMESPACE_KEYWORD) || at(IDENTIFIER) || at(LBRACE) || at(THIS_KEYWORD)) {
+ if (at(NAMESPACE_KEYWORD) || at(IDENTIFIER) || at(FUN_KEYWORD) || at(THIS_KEYWORD)) {
PsiBuilder.Marker rollbackMarker = mark();
parseBinaryExpression(Precedence.ELVIS);
if (at(AT)) {
@@ -801,7 +801,8 @@ public class JetExpressionParsing extends AbstractJetParsing {
parseTuplePattern(DECOMPOSER_ARGUMENT);
list.done(DECOMPOSER_ARGUMENT_LIST);
pattern.done(DECOMPOSER_PATTERN);
- } else {
+ }
+ else {
int expressionEndOffset = myBuilder.getCurrentOffset();
rollbackMarker.rollbackTo();
rollbackMarker = mark();
diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java
index be52054d967..53a85185f55 100644
--- a/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java
+++ b/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java
@@ -37,7 +37,7 @@ public class JetParsing extends AbstractJetParsing {
private static final TokenSet TYPE_PARAMETER_GT_RECOVERY_SET = TokenSet.create(WHERE_KEYWORD, WRAPS_KEYWORD, LPAR, COLON, LBRACE, GT);
private static final TokenSet PARAMETER_NAME_RECOVERY_SET = TokenSet.create(COLON, EQ, COMMA, RPAR);
private static final TokenSet NAMESPACE_NAME_RECOVERY_SET = TokenSet.create(DOT, EOL_OR_SEMICOLON);
- /*package*/ static final TokenSet TYPE_REF_FIRST = TokenSet.create(LBRACKET, IDENTIFIER, LBRACE, LPAR, CAPITALIZED_THIS_KEYWORD);
+ /*package*/ static final TokenSet TYPE_REF_FIRST = TokenSet.create(LBRACKET, IDENTIFIER, FUN_KEYWORD, LPAR, CAPITALIZED_THIS_KEYWORD);
private static final TokenSet RECEIVER_TYPE_TERMINATORS = TokenSet.create(DOT, SAFE_ACCESS);
public static JetParsing createForTopLevel(SemanticWhitespaceAwarePsiBuilder builder) {
@@ -780,13 +780,6 @@ public class JetParsing extends AbstractJetParsing {
// TODO: extract constant
int lastDot = matchTokenStreamPredicate(new FirstBefore(
-// new AbstractTokenStreamPredicate() {
-// @Override
-// public boolean matching(boolean topLevel) {
-// return topLevel
-// && at(DOT);
-// }
-// },
new AtSet(DOT, SAFE_ACCESS),
new AbstractTokenStreamPredicate() {
@Override
@@ -802,17 +795,6 @@ public class JetParsing extends AbstractJetParsing {
parseReceiverType("property", propertyNameFollow, lastDot);
-// if (lastDot == -1) {
-// parseAttributeList();
-// expect(IDENTIFIER, "Expecting property name or receiver type", propertyNameFollow);
-// }
-// else {
-// createTruncatedBuilder(lastDot).parseTypeRef();
-//
-// expect(DOT, "Expecting '.' before a property name", propertyNameFollow);
-// expect(IDENTIFIER, "Expecting property name", propertyNameFollow);
-// }
-
if (at(COLON)) {
advance(); // COLON
parseTypeRef();
@@ -938,10 +920,10 @@ public class JetParsing extends AbstractJetParsing {
return FUN;
}
- boolean typeParameterListOccured = false;
+ boolean typeParameterListOccurred = false;
if (at(LT)) {
parseTypeParameterList(TokenSet.create(LBRACKET, LBRACE, LPAR));
- typeParameterListOccured = true;
+ typeParameterListOccurred = true;
}
int lastDot = findLastBefore(RECEIVER_TYPE_TERMINATORS, TokenSet.create(LPAR), true);
@@ -952,7 +934,7 @@ public class JetParsing extends AbstractJetParsing {
if (at(LT)) {
PsiBuilder.Marker error = mark();
parseTypeParameterList(TokenSet.orSet(TokenSet.create(LPAR), valueParametersFollow));
- if (typeParameterListOccured) {
+ if (typeParameterListOccurred) {
error.error("Only one type parameter list is allowed for a function"); // TODO : discuss
}
else {
@@ -1269,7 +1251,7 @@ public class JetParsing extends AbstractJetParsing {
if (at(IDENTIFIER) || at(NAMESPACE_KEYWORD)) {
parseUserType();
}
- else if (at(LBRACE)) {
+ else if (at(FUN_KEYWORD)) {
parseFunctionType();
}
else if (at(LPAR)) {
@@ -1432,18 +1414,17 @@ public class JetParsing extends AbstractJetParsing {
/*
* functionType
- * : "{" (type ".")? functionTypeContents "}"
+ * : "fun" (type ".")? functionTypeContents
* ;
*/
private void parseFunctionType() {
- assert _at(LBRACE);
+ assert _at(FUN_KEYWORD);
PsiBuilder.Marker functionType = mark();
- myBuilder.disableNewlines();
- advance(); // LBRACE
+ advance(); // FUN_KEYWORD
- int lastLPar = findLastBefore(TokenSet.create(LPAR), TokenSet.create(RBRACE, COLON), false);
+ int lastLPar = findLastBefore(TokenSet.create(LPAR), TokenSet.create(COLON), false);
if (lastLPar >= 0 && lastLPar > myBuilder.getCurrentOffset()) {
// TODO : -1 is a hack?
createTruncatedBuilder(lastLPar - 1).parseTypeRef();
@@ -1452,9 +1433,6 @@ public class JetParsing extends AbstractJetParsing {
parseFunctionTypeContents();
- expect(RBRACE, "Expecting '}");
- myBuilder.restoreNewlinesState();
-
functionType.done(FUNCTION_TYPE);
}
diff --git a/idea/testData/cfg/Basic.instructions b/idea/testData/cfg/Basic.instructions
index d08fd61f141..b5c79c02c71 100644
--- a/idea/testData/cfg/Basic.instructions
+++ b/idea/testData/cfg/Basic.instructions
@@ -100,7 +100,7 @@ error:
=====================
== flfun ==
-fun flfun(f : {() : Any}) : Unit {}
+fun flfun(f : fun () : Any) : Unit {}
---------------------
l0:
diff --git a/idea/testData/cfg/Basic.jet b/idea/testData/cfg/Basic.jet
index 3f7d26bdc82..870c40513a0 100644
--- a/idea/testData/cfg/Basic.jet
+++ b/idea/testData/cfg/Basic.jet
@@ -20,4 +20,4 @@ fun foo(a : Boolean, b : Int) : Unit {}
fun genfun() : Unit {}
-fun flfun(f : {() : Any}) : Unit {}
\ No newline at end of file
+fun flfun(f : fun () : Any) : Unit {}
\ No newline at end of file
diff --git a/idea/testData/checker/Bounds.jet b/idea/testData/checker/Bounds.jet
index 7c8320eb151..3b3f6a41ed2 100644
--- a/idea/testData/checker/Bounds.jet
+++ b/idea/testData/checker/Bounds.jet
@@ -18,10 +18,10 @@ namespace boundsWithSubstitutors {
open class A {}
open class B()
- class CInt>, X : {(B<Char>) : (B<Any>, B)}>() : B<Any>() { // 2 errors
+ class CInt>, X : fun (B<Char>) : (B<Any>, B)>() : B<Any>() { // 2 errors
val a = B<Char>() // error
- val x : {(B<Char>) : B<Any>}
+ val x : fun (B<Char>) : B<Any>
}
diff --git a/idea/testData/checker/regression/Jet121.jet b/idea/testData/checker/regression/Jet121.jet
index e61ee66f66f..72b6d63350e 100644
--- a/idea/testData/checker/regression/Jet121.jet
+++ b/idea/testData/checker/regression/Jet121.jet
@@ -8,7 +8,7 @@ namespace jet121 {
return if (answer == 2) "OK" else "FAIL"
}
- fun apply(arg:String, f : {String.() : Int}) : Int {
+ fun apply(arg:String, f : fun String.() : Int) : Int {
return arg.f()
}
}
\ No newline at end of file
diff --git a/idea/testData/checker/regression/Jet124.jet b/idea/testData/checker/regression/Jet124.jet
index 354a5f1711f..79392a018f1 100644
--- a/idea/testData/checker/regression/Jet124.jet
+++ b/idea/testData/checker/regression/Jet124.jet
@@ -1,8 +1,8 @@
-fun foo1() : {(Int) : Int}
+fun foo1() : fun (Int) : Int
fun foo() {
- val h : {(Int) : Int} = foo1();
+ val h : fun (Int) : Int = foo1();
h(1)
- val m : {(Int) : Int} = {(a : Int) => 1}//foo1()
+ val m : fun (Int) : Int = {(a : Int) => 1}//foo1()
m(1)
}
\ No newline at end of file
diff --git a/idea/testData/codegen/classes/closureWithParameter.jet b/idea/testData/codegen/classes/closureWithParameter.jet
index a190ba76e5c..0c556d628c1 100644
--- a/idea/testData/codegen/classes/closureWithParameter.jet
+++ b/idea/testData/codegen/classes/closureWithParameter.jet
@@ -2,6 +2,6 @@ fun box() : String {
return apply( "OK", {(arg: String) => arg } )
}
-fun apply(arg : String, f : {(p:String) : String}) : String {
+fun apply(arg : String, f : fun (p:String) : String) : String {
return f(arg)
}
diff --git a/idea/testData/codegen/classes/closureWithParameterAndBoxing.jet b/idea/testData/codegen/classes/closureWithParameterAndBoxing.jet
index 002d41ede67..6d0a4ffa658 100644
--- a/idea/testData/codegen/classes/closureWithParameterAndBoxing.jet
+++ b/idea/testData/codegen/classes/closureWithParameterAndBoxing.jet
@@ -2,6 +2,6 @@ fun box() : String {
return if (apply( 5, {(arg: Int) => arg + 13 } ) == 18) "OK" else "fail"
}
-fun apply(arg : Int, f : {(p:Int) : Int}) : Int {
+fun apply(arg : Int, f : fun (p:Int) : Int) : Int {
return f(arg)
}
diff --git a/idea/testData/codegen/classes/enclosingLocalVariable.jet b/idea/testData/codegen/classes/enclosingLocalVariable.jet
index 7f48c3828d6..aaf5081cefb 100644
--- a/idea/testData/codegen/classes/enclosingLocalVariable.jet
+++ b/idea/testData/codegen/classes/enclosingLocalVariable.jet
@@ -3,6 +3,6 @@ fun box() : String {
return if (sum(200, { cl }) == 239) "OK" else "FAIL"
}
-fun sum(arg:Int, f : {() : Int}) : Int {
+fun sum(arg:Int, f : fun () : Int) : Int {
return arg + f()
}
diff --git a/idea/testData/codegen/classes/extensionClosure.jet b/idea/testData/codegen/classes/extensionClosure.jet
index 8f95a8615d8..11fd11b3816 100644
--- a/idea/testData/codegen/classes/extensionClosure.jet
+++ b/idea/testData/codegen/classes/extensionClosure.jet
@@ -8,6 +8,6 @@ fun box() : String {
return if (answer.x == 6 && answer.y == 10) "OK" else "FAIL"
}
-fun apply(arg:Point, f : {Point.(scalar : Int) : Point}) : Point {
+fun apply(arg:Point, f : fun Point.(scalar : Int) : Point) : Point {
return arg.f(2)
}
diff --git a/idea/testData/codegen/classes/simplestClosure.jet b/idea/testData/codegen/classes/simplestClosure.jet
index 20682dfc10a..c851416e4f1 100644
--- a/idea/testData/codegen/classes/simplestClosure.jet
+++ b/idea/testData/codegen/classes/simplestClosure.jet
@@ -2,6 +2,6 @@ fun box() : String {
return invoker( {"OK"} )
}
-fun invoker(gen : {() : String}) : String {
+fun invoker(gen : fun () : String) : String {
return gen()
}
diff --git a/idea/testData/codegen/classes/simplestClosureAndBoxing.jet b/idea/testData/codegen/classes/simplestClosureAndBoxing.jet
index af60d4fed5c..8e3bedb2f37 100644
--- a/idea/testData/codegen/classes/simplestClosureAndBoxing.jet
+++ b/idea/testData/codegen/classes/simplestClosureAndBoxing.jet
@@ -2,6 +2,6 @@ fun box() : String {
return if (int_invoker( { 7 } ) == 7) "OK" else "fail"
}
-fun int_invoker(gen : {() : Int}) : Int {
+fun int_invoker(gen : fun () : Int) : Int {
return gen()
}
diff --git a/idea/testData/codegen/extensionFunctions/generic.jet b/idea/testData/codegen/extensionFunctions/generic.jet
index 88cf5f734e6..fdc73cc4e0e 100644
--- a/idea/testData/codegen/extensionFunctions/generic.jet
+++ b/idea/testData/codegen/extensionFunctions/generic.jet
@@ -1,6 +1,6 @@
import java.util.*
-fun ArrayList.findAll(predicate: {(T) : Boolean}): ArrayList {
+fun ArrayList.findAll(predicate: fun (T) : Boolean): ArrayList {
val result = ArrayList()
for(val t in this) {
if (predicate(t)) result.add(t)
diff --git a/idea/testData/psi/Extensions.jet b/idea/testData/psi/Extensions.jet
index 48a118942d9..6b8bf64220c 100644
--- a/idea/testData/psi/Extensions.jet
+++ b/idea/testData/psi/Extensions.jet
@@ -2,16 +2,16 @@ extension for bar
extension foo for bar
extension for bar
extension foo for bar
-extension foo for {() : ()}
+extension foo for fun () : ()
extension for bar;
extension foo for bar;
extension for bar;
extension foo for bar;
-extension foo for {() : ()};
+extension foo for fun () : ();
extension for bar {}
extension foo for bar {}
extension for bar {}
extension foo for bar {}
-extension foo for {() : ()} {}
\ No newline at end of file
+extension foo for fun () : () {}
\ No newline at end of file
diff --git a/idea/testData/psi/Extensions.txt b/idea/testData/psi/Extensions.txt
index a989658c929..8dcf1ac83e2 100644
--- a/idea/testData/psi/Extensions.txt
+++ b/idea/testData/psi/Extensions.txt
@@ -73,7 +73,8 @@ JetFile: Extensions.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -84,7 +85,6 @@ JetFile: Extensions.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
EXTENSION
PsiElement(extension)('extension')
@@ -163,7 +163,8 @@ JetFile: Extensions.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -174,7 +175,6 @@ JetFile: Extensions.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n\n')
EXTENSION
@@ -266,7 +266,8 @@ JetFile: Extensions.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -277,7 +278,6 @@ JetFile: Extensions.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
diff --git a/idea/testData/psi/Extensions_ERR.jet b/idea/testData/psi/Extensions_ERR.jet
index eeeb7e25139..7dd42ebd6b5 100644
--- a/idea/testData/psi/Extensions_ERR.jet
+++ b/idea/testData/psi/Extensions_ERR.jet
@@ -2,4 +2,4 @@ extension for
extension foo bar
extension for
-extension foo for {() : ()} {}
\ No newline at end of file
+extension foo for fun () : () {}
\ No newline at end of file
diff --git a/idea/testData/psi/Extensions_ERR.txt b/idea/testData/psi/Extensions_ERR.txt
index a869d05d8a9..357a8e68de8 100644
--- a/idea/testData/psi/Extensions_ERR.txt
+++ b/idea/testData/psi/Extensions_ERR.txt
@@ -70,7 +70,8 @@ JetFile: Extensions_ERR.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -81,7 +82,6 @@ JetFile: Extensions_ERR.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
diff --git a/idea/testData/psi/FunctionTypes.jet b/idea/testData/psi/FunctionTypes.jet
index aa390d04819..4187222c8e0 100644
--- a/idea/testData/psi/FunctionTypes.jet
+++ b/idea/testData/psi/FunctionTypes.jet
@@ -1,34 +1,24 @@
-type f = {([a] a) : b}
-type f = {(a) : b}
-type f = {() : [x] b}
-type f = {() : ()}
+type f = fun ([a] a) : b
+type f = fun (a) : b
+type f = fun () : [x] b
+type f = fun () : ()
-type f = {(a : [a] a) : b}
-type f = {(a : a) : b}
-type f = {() : b}
-type f = {() : ()}
+type f = fun (a : [a] a) : b
+type f = fun (a : a) : b
+type f = fun () : b
+type f = fun () : ()
-type f = {(a : [a] a, foo, x : bar) : b}
-type f = {(foo, a : a) : b}
-type f = {(foo, a : {(a) : b}) : b}
-type f = {(foo, a : {(a) : b}) : {() : ()}}
+type f = fun (a : [a] a, foo, x : bar) : b
+type f = fun (foo, a : a) : b
+type f = fun (foo, a : fun (a) : b) : b
+type f = fun (foo, a : fun (a) : b) : fun () : ()
-type f = {(ref foo, ref a : {(ref a) : b}) : {() : ()}}
+type f = fun (ref foo, ref a : fun (ref a) : b) : fun () : ()
-type f = {T.() : ()}
-type f = {T.T.() : ()}
-type f = {T.T.() : ()}
-type f = {{(S).() : ()}.() : ()}
-type f = {{T.() : ()}.() : ()}
-type f = {{T.T.() : ()}.() : ()}
-type f = {{T.T.() : ()}.() : ()}
-type f = {{(S).() : ()}.() : ()}
+type f = fun T.() : ()
+type f = fun T.T.() : ()
+type f = fun T.T.() : ()
-type f = [a] {T.() : ()}
-type f = [a] {T.T.() : ()}
-type f = [a] {T.T.() : ()}
-type f = [a] {[a] {(S).() : ()}.() : ()}
-type f = [a] {[a] {T.() : ()}.() : ()}
-type f = [a] {[a] {T.T.() : ()}.() : ()}
-type f = [a] {[a] {T.T.() : ()}.() : ()}
-type f = [a] {[a] {(S).() : ()}.() : ()}
\ No newline at end of file
+type f = [a] fun T.() : ()
+type f = [a] fun T.T.() : ()
+type f = [a] fun T.T.() : ()
diff --git a/idea/testData/psi/FunctionTypes.txt b/idea/testData/psi/FunctionTypes.txt
index 354469402dd..da47f49234c 100644
--- a/idea/testData/psi/FunctionTypes.txt
+++ b/idea/testData/psi/FunctionTypes.txt
@@ -11,7 +11,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -37,7 +38,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -50,7 +50,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -66,7 +67,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -79,7 +79,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -99,7 +100,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -112,7 +112,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -123,7 +124,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEDEF
PsiElement(type)('type')
@@ -136,7 +136,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -165,7 +166,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -178,7 +178,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -198,7 +199,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -211,7 +211,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -222,7 +223,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -235,7 +235,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -246,7 +247,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEDEF
PsiElement(type)('type')
@@ -259,7 +259,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -306,7 +307,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -319,7 +319,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -346,7 +347,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -359,7 +359,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -376,7 +377,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -392,7 +394,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
@@ -401,7 +402,6 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -414,7 +414,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -431,7 +432,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -447,14 +449,14 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -465,8 +467,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEDEF
PsiElement(type)('type')
@@ -479,7 +479,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -502,7 +503,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -521,14 +523,14 @@ JetFile: FunctionTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -539,8 +541,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEDEF
PsiElement(type)('type')
@@ -553,7 +553,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
@@ -569,7 +570,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -582,7 +582,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
USER_TYPE
@@ -602,7 +603,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -615,7 +615,8 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
USER_TYPE
@@ -658,266 +659,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('S')
- PsiElement(RPAR)(')')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('x')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('S')
- PsiElement(RPAR)(')')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEDEF
PsiElement(type)('type')
@@ -939,7 +680,8 @@ JetFile: FunctionTypes.jet
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
@@ -955,7 +697,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -977,7 +718,8 @@ JetFile: FunctionTypes.jet
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
USER_TYPE
@@ -997,7 +739,6 @@ JetFile: FunctionTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
@@ -1019,7 +760,8 @@ JetFile: FunctionTypes.jet
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
USER_TYPE
@@ -1061,354 +803,4 @@ JetFile: FunctionTypes.jet
TYPE_REFERENCE
TUPLE_TYPE
PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('S')
- PsiElement(RPAR)(')')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('x')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('S')
- PsiElement(RPAR)(')')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(RPAR)(')')
\ No newline at end of file
diff --git a/idea/testData/psi/FunctionTypes_ERR.jet b/idea/testData/psi/FunctionTypes_ERR.jet
index 9aa7318d4a2..204ee20a422 100644
--- a/idea/testData/psi/FunctionTypes_ERR.jet
+++ b/idea/testData/psi/FunctionTypes_ERR.jet
@@ -1,2 +1 @@
-type f = {([a] a) b}
-type f = {(a, ) : b}
+type f = fun (a, ) : b
diff --git a/idea/testData/psi/FunctionTypes_ERR.txt b/idea/testData/psi/FunctionTypes_ERR.txt
index 454009ee99d..2278bfb4388 100644
--- a/idea/testData/psi/FunctionTypes_ERR.txt
+++ b/idea/testData/psi/FunctionTypes_ERR.txt
@@ -11,46 +11,8 @@ JetFile: FunctionTypes_ERR.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- MODIFIER_LIST
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiErrorElement:Expecting ':' followed by a return type
-
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -69,5 +31,4 @@ JetFile: FunctionTypes_ERR.jet
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(IDENTIFIER)('b')
\ No newline at end of file
diff --git a/idea/testData/psi/Functions.jet b/idea/testData/psi/Functions.jet
index aa832351da4..dd2c0aec7a8 100644
--- a/idea/testData/psi/Functions.jet
+++ b/idea/testData/psi/Functions.jet
@@ -1,25 +1,21 @@
fun foo()
fun [a] foo()
fun [a] T.foo()
-fun {[a] T.(A) : ()}.foo()
fun [a] T.foo(a : foo) : bar
-fun [a()] T.foo(a : foo) : bar
+fun [a()] T.foo(a : foo) : bar
fun foo();
fun [a] foo();
fun [a] T.foo();
-fun {[a] T.(A) : ()}.foo();
fun [a] T.foo(a : foo) : bar;
-fun [a()] T.foo(a : foo) : bar;
+fun [a()] T.foo(a : foo) : bar;
fun foo() {}
fun [a] foo() {}
fun [a] T.foo() {}
-fun {[a] T.(A) : ()}.foo() {}
fun [a] T.foo(a : foo) : bar {}
-fun [a()] T.foo(a : foo) : bar {}
+fun [a()] T.foo(a : foo) : bar {}
-fun [a] {[a] T.(A) : ()}.foo() {}
-fun [a()] T.foo(a : foo) : bar {}
+fun [a()] T.foo(a : foo) : bar {}
fun A?.foo() : bar?
\ No newline at end of file
diff --git a/idea/testData/psi/Functions.txt b/idea/testData/psi/Functions.txt
index 667709d88b4..93b700cd930 100644
--- a/idea/testData/psi/Functions.txt
+++ b/idea/testData/psi/Functions.txt
@@ -47,64 +47,6 @@ JetFile: Functions.jet
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
@@ -173,7 +115,8 @@ JetFile: Functions.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -189,7 +132,6 @@ JetFile: Functions.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(GT)('>')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -261,65 +203,6 @@ JetFile: Functions.jet
PsiElement(RPAR)(')')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
@@ -389,7 +272,8 @@ JetFile: Functions.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -405,7 +289,6 @@ JetFile: Functions.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(GT)('>')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -487,68 +370,6 @@ JetFile: Functions.jet
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
@@ -621,7 +442,8 @@ JetFile: Functions.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -637,7 +459,6 @@ JetFile: Functions.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(GT)('>')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -663,77 +484,6 @@ JetFile: Functions.jet
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
@@ -773,7 +523,8 @@ JetFile: Functions.jet
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -789,7 +540,6 @@ JetFile: Functions.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACE)('}')
PsiElement(GT)('>')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
diff --git a/idea/testData/psi/Functions_ERR.jet b/idea/testData/psi/Functions_ERR.jet
index 08d7ed21abe..3c0949fd5c5 100644
--- a/idea/testData/psi/Functions_ERR.jet
+++ b/idea/testData/psi/Functions_ERR.jet
@@ -1,13 +1,9 @@
fun foo)
fun [a] f foo()
fun [a] T.foo(a : ) : bar
-fun [a()] T.foo(a : foo) : bar
fun [a()] T.foo<>(a : foo) : bar
fun [a()] T.foo(a : foo) : bar
fun [a()] T.foo<, T, , T>(a : foo) : bar
fun [a()] T.foo(, a : foo, , a: b) : bar
fun foo() : = a;
-
-
-fun {[a] T.(A) : ()}.-()
\ No newline at end of file
diff --git a/idea/testData/psi/Functions_ERR.txt b/idea/testData/psi/Functions_ERR.txt
index 90ac9efa5ea..789c5227747 100644
--- a/idea/testData/psi/Functions_ERR.txt
+++ b/idea/testData/psi/Functions_ERR.txt
@@ -70,75 +70,6 @@ JetFile: Functions_ERR.jet
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiWhiteSpace('\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiErrorElement:Expecting '}
-
- PsiElement(GT)('>')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
@@ -377,63 +308,4 @@ JetFile: Functions_ERR.jet
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n\n\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiErrorElement:Expecting function name
- PsiElement(MINUS)('-')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
\ No newline at end of file
+ PsiElement(SEMICOLON)(';')
\ No newline at end of file
diff --git a/idea/testData/psi/LocalDeclarations.jet b/idea/testData/psi/LocalDeclarations.jet
index ac8da9ffb17..5181558fb42 100644
--- a/idea/testData/psi/LocalDeclarations.jet
+++ b/idea/testData/psi/LocalDeclarations.jet
@@ -6,7 +6,7 @@ fun foo() {
out val foo = 5
[a] var foo = 4
- type f = {T.() : ()}
+ type f = fun T.() : ()
virtual extension foo for bar {
diff --git a/idea/testData/psi/LocalDeclarations.txt b/idea/testData/psi/LocalDeclarations.txt
index 38e3638aa52..e039f0ca6cc 100644
--- a/idea/testData/psi/LocalDeclarations.txt
+++ b/idea/testData/psi/LocalDeclarations.txt
@@ -107,7 +107,8 @@ JetFile: LocalDeclarations.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
@@ -123,7 +124,6 @@ JetFile: LocalDeclarations.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
EXTENSION
MODIFIER_LIST
diff --git a/idea/testData/psi/Precedence.jet b/idea/testData/psi/Precedence.jet
index 20a32974123..3970cea3476 100644
--- a/idea/testData/psi/Precedence.jet
+++ b/idea/testData/psi/Precedence.jet
@@ -37,19 +37,19 @@ fun foo() {
t : Any?
t as Any?
t as Any.Any.Any
- t as {() : T}
+ t as fun () : T
t as? Any?
t as? Any.Any.Any
- t as? {() : T}
+ t as? fun () : T
t : Any * 1
t : Any? * 1
t as Any? * 1
t as Any.Any.Any * 1
- t as {() : T} * 1
+ t as fun () : T * 1
t as? Any? * 1
t as? Any.Any.Any * 1
- t as? {() : T} * 1
+ t as? fun () : T * 1
++t : Any + 1
a.b : Any + 1
diff --git a/idea/testData/psi/Precedence.txt b/idea/testData/psi/Precedence.txt
index ddbdcb0251f..578dcf46a8d 100644
--- a/idea/testData/psi/Precedence.txt
+++ b/idea/testData/psi/Precedence.txt
@@ -789,7 +789,8 @@ JetFile: Precedence.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -800,7 +801,6 @@ JetFile: Precedence.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
BINARY_WITH_TYPE
REFERENCE_EXPRESSION
@@ -869,7 +869,8 @@ JetFile: Precedence.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -880,7 +881,6 @@ JetFile: Precedence.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
BINARY_EXPRESSION
BINARY_WITH_TYPE
@@ -1004,7 +1004,8 @@ JetFile: Precedence.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -1015,7 +1016,6 @@ JetFile: Precedence.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
- PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MUL)('*')
@@ -1105,7 +1105,8 @@ JetFile: Precedence.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -1116,7 +1117,6 @@ JetFile: Precedence.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
- PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MUL)('*')
diff --git a/idea/testData/psi/Properties.jet b/idea/testData/psi/Properties.jet
index 08fdf1a2e33..3549ca9edc7 100644
--- a/idea/testData/psi/Properties.jet
+++ b/idea/testData/psi/Properties.jet
@@ -4,36 +4,12 @@ val foo
val [a] foo
val foo.bar
-val {() : ()}.foo
-val {foo.bar.() : ()}.foo
-
val foo : T
val [a] foo = bar
val foo.bar
get() {}
set(sad) = foo
-val {foo.bar.() : ()}.foo = foo
- get() {}
- set(it) {}
-
-val {foo.bar.() : ()}.foo = foo
- get() : Foo {}
- set(it) {}
-
-
-val {foo.bar.() : ()}.foo : bar = foo
- [a] public get() {}
- virtual set(a : b) {}
-
-
-val {foo.bar.() : ()}.foo : bar = foo
- virtual set(a : b) {}
-
-
-val {foo.bar.() : ()}.foo : bar = foo
- [a] public get() {}
-
val foo get
val foo set
diff --git a/idea/testData/psi/Properties.txt b/idea/testData/psi/Properties.txt
index 8011b4cd5db..d5456af8d40 100644
--- a/idea/testData/psi/Properties.txt
+++ b/idea/testData/psi/Properties.txt
@@ -47,55 +47,6 @@ JetFile: Properties.jet
PsiElement(DOT)('.')
PsiElement(IDENTIFIER)('bar')
PsiWhiteSpace('\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
@@ -158,332 +109,6 @@ JetFile: Properties.jet
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(get)('get')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(set)('set')
- PsiElement(LPAR)('(')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('it')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(get)('get')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(set)('set')
- PsiElement(LPAR)('(')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('it')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- MODIFIER_LIST
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PsiElement(public)('public')
- PsiWhiteSpace(' ')
- PsiElement(get)('get')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- MODIFIER_LIST
- PsiElement(virtual)('virtual')
- PsiWhiteSpace(' ')
- PsiElement(set)('set')
- PsiElement(LPAR)('(')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- MODIFIER_LIST
- PsiElement(virtual)('virtual')
- PsiWhiteSpace(' ')
- PsiElement(set)('set')
- PsiElement(LPAR)('(')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- MODIFIER_LIST
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PsiElement(public)('public')
- PsiWhiteSpace(' ')
- PsiElement(get)('get')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n\n')
PROPERTY
PsiElement(val)('val')
diff --git a/idea/testData/psi/Properties_ERR.jet b/idea/testData/psi/Properties_ERR.jet
index ebc1d4b9829..d6f36fe753a 100644
--- a/idea/testData/psi/Properties_ERR.jet
+++ b/idea/testData/psi/Properties_ERR.jet
@@ -9,15 +9,6 @@ val foo.bar
public () {}
() = foo
-val {foo.bar.() : ()}.foo = foo
- set) {}
- dfget() {}
-
-val {foo.bar.() : ()}.foo = foo
- get(foo) {}
- set() {}
- set() {}
-
val f.d.- = f
val foo
diff --git a/idea/testData/psi/Properties_ERR.txt b/idea/testData/psi/Properties_ERR.txt
index b99669b22db..b753d1a8d38 100644
--- a/idea/testData/psi/Properties_ERR.txt
+++ b/idea/testData/psi/Properties_ERR.txt
@@ -129,139 +129,6 @@ JetFile: Properties_ERR.jet
PsiErrorElement:Expecting namespace or top level declaration
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace('\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(set)('set')
- PsiErrorElement:Accessor body expected
- PsiElement(RPAR)(')')
- PsiErrorElement:Expecting '('
-
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiErrorElement:Expecting parameter name
-
- PsiErrorElement:Expecting ')'
-
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(IDENTIFIER)('dfget')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(LPAR)('(')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(LBRACE)('{')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(get)('get')
- PsiElement(LPAR)('(')
- PsiErrorElement:Expecting ')'
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(set)('set')
- PsiElement(LPAR)('(')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiErrorElement:Expecting parameter name
-
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(IDENTIFIER)('set')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(LPAR)('(')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(LBRACE)('{')
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
diff --git a/idea/testData/psi/TypeParametersBeforeName.jet b/idea/testData/psi/TypeParametersBeforeName.jet
index 93cafe82b55..da3fe47f5b4 100644
--- a/idea/testData/psi/TypeParametersBeforeName.jet
+++ b/idea/testData/psi/TypeParametersBeforeName.jet
@@ -1,7 +1,6 @@
fun foo()
fun [a] foo()
fun [a] T.foo()
-fun [a] {() : Unit}.foo()
val List.foo
var List.foo
\ No newline at end of file
diff --git a/idea/testData/psi/TypeParametersBeforeName.txt b/idea/testData/psi/TypeParametersBeforeName.txt
index b52c571ead0..bd3a4300807 100644
--- a/idea/testData/psi/TypeParametersBeforeName.txt
+++ b/idea/testData/psi/TypeParametersBeforeName.txt
@@ -76,48 +76,6 @@ JetFile: TypeParametersBeforeName.jet
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiWhiteSpace('\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('B')
- PsiElement(GT)('>')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ATTRIBUTE_ANNOTATION
- PsiElement(LBRACKET)('[')
- ATTRIBUTE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Unit')
- PsiElement(RBRACE)('}')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
diff --git a/idea/testData/psi/When.jet b/idea/testData/psi/When.jet
index 6c1cb41b5bf..2ae6def484b 100644
--- a/idea/testData/psi/When.jet
+++ b/idea/testData/psi/When.jet
@@ -52,7 +52,7 @@ fun foo() {
in 1..2 => dsf
!in 2 => sd
!is t => d
- is {(foo) : Bar} => fgpp
+ is fun (foo) : Bar => fgpp
is (1, val a is Foo, *, Foo, bar) => d
is (Foo, val a in 1..2, *, val _ !is Foo, val bar is foo.bar @ (a)) => d
is (Int, Int) => 2
diff --git a/idea/testData/psi/When.txt b/idea/testData/psi/When.txt
index e5cc9a1d183..493f8870abb 100644
--- a/idea/testData/psi/When.txt
+++ b/idea/testData/psi/When.txt
@@ -804,7 +804,8 @@ JetFile: When.jet
TYPE_PATTERN
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -820,7 +821,6 @@ JetFile: When.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Bar')
- PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace(' ')
diff --git a/idea/testData/psi/examples/Builder.jet b/idea/testData/psi/examples/Builder.jet
index 64427be91a1..caf51c29d2c 100644
--- a/idea/testData/psi/examples/Builder.jet
+++ b/idea/testData/psi/examples/Builder.jet
@@ -31,7 +31,7 @@ class AntBuilder {
fun classpath(entries : ClassPathEntry/*...*/) { /*...*/ }
}
- fun library(initializer : { Library.() : Library}) {
+ fun library(initializer : fun Library.() : Library) {
val lib = Library()
lib.initializer()
return lib
diff --git a/idea/testData/psi/examples/Builder.txt b/idea/testData/psi/examples/Builder.txt
index 5f240f113bd..8a256b3d745 100644
--- a/idea/testData/psi/examples/Builder.txt
+++ b/idea/testData/psi/examples/Builder.txt
@@ -371,8 +371,8 @@ JetFile: Builder.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- PsiWhiteSpace(' ')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
@@ -388,7 +388,6 @@ JetFile: Builder.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Library')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
diff --git a/idea/testData/psi/examples/FunctionsAndTypes.jet b/idea/testData/psi/examples/FunctionsAndTypes.jet
index 623e765c4ac..6644dd6b03c 100644
--- a/idea/testData/psi/examples/FunctionsAndTypes.jet
+++ b/idea/testData/psi/examples/FunctionsAndTypes.jet
@@ -1,24 +1,24 @@
-type f1 = {(T) : X}
+type f1 = fun (T) : X
// type f1 = {(T) => X}
-type f2 = {(T, E) : X}
+type f2 = fun (T, E) : X
// type f2 = {(T, E) => X}
-type f_tuple = {((T, E)) : X}
+type f_tuple = fun ((T, E)) : X
//type f_tuple = {((T, E)) => X}
-type hof = { (X) : {(T) : Y} }
+type hof = fun (X) : fun (T) : Y
//type hof = { (X) => {(T) => Y} }
-type hof2 = { ({(X) : Y}) : {(Y) : Z} }
+type hof2 = fun (fun (X) : Y) : fun (Y) : Z
//type hof2 = { {(X) => Y} => {(Y) => Z} }
-type Comparison = {(a : T, b : T) : Int}
+type Comparison = fun (a : T, b : T) : Int
//type Comparison = {(a : T, b : T) => Int}
-type Equality = {(a : T, b : T) : Boolean}
+type Equality = fun (a : T, b : T) : Boolean
//type Equality = {(a : T, b : T) => Boolean}
-type HashFunction = {(obj : T) : Int}
+type HashFunction = fun (obj : T) : Int
//type HashFunction = {(obj : T) => Int}
-type Runnable = {() : ()}
+type Runnable = fun () : ()
//type Runnable = {() => ()}
-type Function1 = {(input : T) : R}
+type Function1 = fun (input : T) : R
//type Function1 = {(input : T) => R}
@@ -30,5 +30,5 @@ val f1 = {(T) : X => something(it)}
val f1 = {t => something(t)}
val f1 = {something(it)}
-val f1 : {(T) : X} = {X()}
+val f1 : fun (T) : X = {X()}
diff --git a/idea/testData/psi/examples/FunctionsAndTypes.txt b/idea/testData/psi/examples/FunctionsAndTypes.txt
index cc43dd2cb0c..6b2c0dfd160 100644
--- a/idea/testData/psi/examples/FunctionsAndTypes.txt
+++ b/idea/testData/psi/examples/FunctionsAndTypes.txt
@@ -11,7 +11,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -27,7 +28,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('X')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('// type f1 = {(T) => X}')
PsiWhiteSpace('\n')
@@ -42,7 +42,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -65,7 +66,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('X')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('// type f2 = {(T, E) => X}')
PsiWhiteSpace('\n')
@@ -80,7 +80,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -106,7 +107,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('X')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type f_tuple = {((T, E)) => X}')
PsiWhiteSpace('\n')
@@ -121,8 +121,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- PsiWhiteSpace(' ')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -136,7 +136,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -152,9 +153,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Y')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type hof = { (X) => {(T) => Y} }')
PsiWhiteSpace('\n')
@@ -169,14 +167,15 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
- PsiWhiteSpace(' ')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -192,14 +191,14 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Y')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -215,9 +214,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Z')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type hof2 = { {(X) => Y} => {(Y) => Z} }')
PsiWhiteSpace('\n\n\n')
@@ -238,7 +234,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -269,7 +266,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type Comparison = {(a : T, b : T) => Int}')
PsiWhiteSpace('\n')
@@ -290,7 +286,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -321,7 +318,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Boolean')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type Equality = {(a : T, b : T) => Boolean}')
PsiWhiteSpace('\n')
@@ -342,7 +338,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -362,7 +359,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type HashFunction = {(obj : T) => Int}')
PsiWhiteSpace('\n')
@@ -377,7 +373,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -388,7 +385,6 @@ JetFile: FunctionsAndTypes.jet
TUPLE_TYPE
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type Runnable = {() => ()}')
PsiWhiteSpace('\n')
@@ -416,7 +412,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -436,7 +433,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('R')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('//type Function1 = {(input : T) => R}')
PsiWhiteSpace('\n\n\n')
@@ -653,7 +649,8 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -669,7 +666,6 @@ JetFile: FunctionsAndTypes.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('X')
- PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
diff --git a/idea/testData/psi/examples/Graph.jet b/idea/testData/psi/examples/Graph.jet
index 5dd16131bce..7e373b1e9d6 100644
--- a/idea/testData/psi/examples/Graph.jet
+++ b/idea/testData/psi/examples/Graph.jet
@@ -24,11 +24,11 @@ class Graph {
fun neighbours(v : Vertex) = edges.filter{it.from == v}.map{it.to} // type is IIterable>
- fun dfs(handler : {(V) : Unit}) {
+ fun dfs(handler : fun (V) : Unit) {
val visited = HashSet>()
vertices.foreach{dfs(it, visited, handler)}
- fun dfs(current : Vertex, visited : ISet>, handler : {(V) : Unit}) {
+ fun dfs(current : Vertex, visited : ISet>, handler : fun (V) : Unit) {
if (!visited.add(current))
return
handler(current)
@@ -36,7 +36,7 @@ class Graph {
}
}
- public fun traverse(pending : IPushPop>, visited : ISet>, handler : {(V) : Unit}) {
+ public fun traverse(pending : IPushPop>, visited : ISet>, handler : fun (V) : Unit) {
vertices.foreach {
if (!visited.add(it))
continue
diff --git a/idea/testData/psi/examples/Graph.txt b/idea/testData/psi/examples/Graph.txt
index e746f7c8016..b259175e054 100644
--- a/idea/testData/psi/examples/Graph.txt
+++ b/idea/testData/psi/examples/Graph.txt
@@ -470,7 +470,8 @@ JetFile: Graph.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -486,7 +487,6 @@ JetFile: Graph.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Unit')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
@@ -613,7 +613,8 @@ JetFile: Graph.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -629,7 +630,6 @@ JetFile: Graph.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Unit')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
@@ -785,7 +785,8 @@ JetFile: Graph.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -801,7 +802,6 @@ JetFile: Graph.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Unit')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
diff --git a/idea/testData/psi/examples/PolymorphicClassObjects.jet b/idea/testData/psi/examples/PolymorphicClassObjects.jet
index 9e05a3ac741..b2b042c4ac7 100644
--- a/idea/testData/psi/examples/PolymorphicClassObjects.jet
+++ b/idea/testData/psi/examples/PolymorphicClassObjects.jet
@@ -21,7 +21,7 @@ extension Map
T : Iterable,
class object T : Buildable for T {
- fun map(f : {(E) : R}) : T = {
+ fun map(f : fun (E) : R) : T = {
val builder = T.newBuilder()
for (e in this) {
builder += f(e)
diff --git a/idea/testData/psi/examples/PolymorphicClassObjects.txt b/idea/testData/psi/examples/PolymorphicClassObjects.txt
index 9088082cb96..34c55ca19d7 100644
--- a/idea/testData/psi/examples/PolymorphicClassObjects.txt
+++ b/idea/testData/psi/examples/PolymorphicClassObjects.txt
@@ -290,7 +290,8 @@ JetFile: PolymorphicClassObjects.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -306,7 +307,6 @@ JetFile: PolymorphicClassObjects.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('R')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
diff --git a/idea/testData/psi/examples/With.jet b/idea/testData/psi/examples/With.jet
index 8dc0a46640b..7303da79f0a 100644
--- a/idea/testData/psi/examples/With.jet
+++ b/idea/testData/psi/examples/With.jet
@@ -1,4 +1,4 @@
-[inline] fun with(receiver : T, body : {T.() : Unit}) = receiver.body()
+[inline] fun with(receiver : T, body : fun T.() : Unit) = receiver.body()
fun example() {
diff --git a/idea/testData/psi/examples/With.txt b/idea/testData/psi/examples/With.txt
index 8bcf407233c..3e598cbbe49 100644
--- a/idea/testData/psi/examples/With.txt
+++ b/idea/testData/psi/examples/With.txt
@@ -39,7 +39,8 @@ JetFile: With.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
@@ -55,7 +56,6 @@ JetFile: With.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Unit')
- PsiElement(RBRACE)('}')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
diff --git a/idea/testData/psi/examples/util/Comparison.jet b/idea/testData/psi/examples/util/Comparison.jet
index bda2f4de89b..00e8bc10327 100644
--- a/idea/testData/psi/examples/util/Comparison.jet
+++ b/idea/testData/psi/examples/util/Comparison.jet
@@ -1,4 +1,4 @@
-type Comparison = {(T, T) : Int}
+type Comparison = fun (T, T) : Int
fun naturalOrder>(a : T, b : T) : Int = a.compareTo(b)
@@ -8,7 +8,7 @@ enum class ComparisonResult {
LS; EQ; GR
}
-type MatchableComparison = {(T, T) : ComparisonResult}
+type MatchableComparison = fun (T, T) : ComparisonResult
fun asMatchableComparison(cmp : Comparison) : MatchableComparison = {(a, b) =>
val res = cmp(a, b)
diff --git a/idea/testData/psi/examples/util/Comparison.txt b/idea/testData/psi/examples/util/Comparison.txt
index 2a800966830..d16d5a10c00 100644
--- a/idea/testData/psi/examples/util/Comparison.txt
+++ b/idea/testData/psi/examples/util/Comparison.txt
@@ -17,7 +17,8 @@ JetFile: Comparison.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -40,7 +41,6 @@ JetFile: Comparison.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
@@ -256,7 +256,8 @@ JetFile: Comparison.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
- PsiElement(LBRACE)('{')
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -279,7 +280,6 @@ JetFile: Comparison.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('ComparisonResult')
- PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
diff --git a/idea/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.jet b/idea/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.jet
new file mode 100644
index 00000000000..b71df72a9f3
--- /dev/null
+++ b/idea/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.jet
@@ -0,0 +1,12 @@
+type f = {T.T.() : ()}
+type f = {{(S).() : ()}.() : ()}
+type f = {{T.() : ()}.() : ()}
+type f = {{T.T.() : ()}.() : ()}
+type f = {{T.T.() : ()}.() : ()}
+type f = {{(S).() : ()}.() : ()}
+
+type f = [a] {[a] {(S).() : ()}.() : ()}
+type f = [a] {[a] {T.() : ()}.() : ()}
+type f = [a] {[a] {T.T.() : ()}.() : ()}
+type f = [a] {[a] {T.T.() : ()}.() : ()}
+type f = [a] {[a] {(S).() : ()}.() : ()}
\ No newline at end of file
diff --git a/idea/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.jet b/idea/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.jet
new file mode 100644
index 00000000000..7060a6e3735
--- /dev/null
+++ b/idea/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.jet
@@ -0,0 +1,12 @@
+fun {[a] T.(A) : ()}.foo()
+fun {[a] T.(A) : ()}.foo();
+fun {[a] T.(A) : ()}.foo() {}
+fun [a] {[a] T.(A) : ()}.foo() {}
+fun [a] {() : Unit}.foo()
+
+// And tuples, too
+fun (A, B).foo() : Unit {}
+
+
+// Recovery
+fun fun [a] T.(A) : ().-()
diff --git a/idea/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.jet b/idea/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.jet
new file mode 100644
index 00000000000..dd64b7d8b13
--- /dev/null
+++ b/idea/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.jet
@@ -0,0 +1,35 @@
+val {() : ()}.foo
+val {foo.bar.() : ()}.foo
+
+val {foo.bar.() : ()}.foo = foo
+ get() {}
+ set(it) {}
+
+val {foo.bar.() : ()}.foo = foo
+ get() : Foo {}
+ set(it) {}
+
+
+val {foo.bar.() : ()}.foo : bar = foo
+ [a] public get() {}
+ virtual set(a : b) {}
+
+
+val {foo.bar.() : ()}.foo : bar = foo
+ virtual set(a : b) {}
+
+
+val {foo.bar.() : ()}.foo : bar = foo
+ [a] public get() {}
+
+// Error recovery:
+
+val {foo.bar.() : ()}.foo = foo
+ set) {}
+ dfget() {}
+
+val {foo.bar.() : ()}.foo = foo
+ get(foo) {}
+ set() {}
+ set() {}
+
diff --git a/idea/testData/resolve/FunctionVariable.jet b/idea/testData/resolve/FunctionVariable.jet
index b23da26721c..b7ea7a62f8a 100644
--- a/idea/testData/resolve/FunctionVariable.jet
+++ b/idea/testData/resolve/FunctionVariable.jet
@@ -1,3 +1,3 @@
-fun invoker(~gen~gen : {() : Int}) : Int {
+fun invoker(~gen~gen : fun () : Int) : Int {
return `gen`gen() // Says it cannot resolve 'gen' here
}
diff --git a/idea/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java b/idea/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java
index f416987f2b8..be443bc7944 100644
--- a/idea/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java
+++ b/idea/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java
@@ -318,25 +318,25 @@ public class JetTypeCheckerTest extends LightDaemonAnalyzerTestCase {
}
public void testFunctionLiterals() throws Exception {
- assertType("{() => }", "{() : Unit}");
- assertType("{() : Int => }", "{() : Int}");
- assertType("{() => 1}", "{() : Int}");
+ assertType("{() => }", "fun () : Unit");
+ assertType("{() : Int => }", "fun () : Int");
+ assertType("{() => 1}", "fun () : Int");
- assertType("{(a : Int) => 1}", "{(a : Int) : Int}");
- assertType("{(a : Int, b : String) => 1}", "{(a : Int, b : String) : Int}");
+ assertType("{(a : Int) => 1}", "fun (a : Int) : Int");
+ assertType("{(a : Int, b : String) => 1}", "fun (a : Int, b : String) : Int");
- assertType("{(a : Int) => 1}", "{(Int) : Int}");
- assertType("{(a : Int, b : String) => 1}", "{(Int, String) : Int}");
+ assertType("{(a : Int) => 1}", "fun (Int) : Int");
+ assertType("{(a : Int, b : String) => 1}", "fun (Int, String) : Int");
- assertType("{Any.() => 1}", "{Any.() : Int}");
+ assertType("{Any.() => 1}", "fun Any.() : Int");
- assertType("{Any.(a : Int) => 1}", "{Any.(a : Int) : Int}");
- assertType("{Any.(a : Int, b : String) => 1}", "{Any.(a : Int, b : String) : Int}");
+ assertType("{Any.(a : Int) => 1}", "fun Any.(a : Int) : Int");
+ assertType("{Any.(a : Int, b : String) => 1}", "fun Any.(a : Int, b : String) : Int");
- assertType("{Any.(a : Int) => 1}", "{Any.(Int) : Int}");
- assertType("{Any.(a : Int, b : String) => 1}", "{Any.(Int, String) : Int}");
+ assertType("{Any.(a : Int) => 1}", "fun Any.(Int) : Int");
+ assertType("{Any.(a : Int, b : String) => 1}", "fun Any.(Int, String) : Int");
- assertType("{Any.(a : Int, b : String) => b}", "{Any.(Int, String) : String}");
+ assertType("{Any.(a : Int, b : String) => b}", "fun Any.(Int, String) : String");
}
public void testBlocks() throws Exception {