diff --git a/.idea/libraries/idea_full.xml b/.idea/libraries/idea_full.xml
index 30b7644b98f..9c83e5185c0 100644
--- a/.idea/libraries/idea_full.xml
+++ b/.idea/libraries/idea_full.xml
@@ -4,7 +4,155 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/intellij_core.xml b/.idea/libraries/intellij_core.xml
index d14331541a7..a019534fb03 100644
--- a/.idea/libraries/intellij_core.xml
+++ b/.idea/libraries/intellij_core.xml
@@ -4,7 +4,61 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/IDEA.xml b/.idea/runConfigurations/IDEA.xml
index 7abb88e097a..52b7dc952cc 100644
--- a/.idea/runConfigurations/IDEA.xml
+++ b/.idea/runConfigurations/IDEA.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/.idea/runConfigurations/IDEA__No_ProcessCanceledException_.xml b/.idea/runConfigurations/IDEA__No_ProcessCanceledException_.xml
index 58141b697da..e1978d2570e 100644
--- a/.idea/runConfigurations/IDEA__No_ProcessCanceledException_.xml
+++ b/.idea/runConfigurations/IDEA__No_ProcessCanceledException_.xml
@@ -1,7 +1,7 @@
-
+
@@ -16,7 +16,9 @@
+
+
\ No newline at end of file
diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java
index 3cb42d49616..133ccc22a8c 100644
--- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java
+++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java
@@ -6,70 +6,25 @@ import com.google.common.collect.Sets;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.JavaPsiFacade;
-import com.intellij.psi.PsiArrayType;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiClassType;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.PsiEllipsisType;
-import com.intellij.psi.PsiJavaFile;
-import com.intellij.psi.PsiMethod;
-import com.intellij.psi.PsiModifier;
-import com.intellij.psi.PsiModifierListOwner;
-import com.intellij.psi.PsiPackage;
-import com.intellij.psi.PsiPrimitiveType;
-import com.intellij.psi.PsiType;
-import com.intellij.psi.PsiTypeParameter;
-import com.intellij.psi.PsiTypeParameterListOwner;
-import com.intellij.psi.PsiTypeVariable;
-import com.intellij.psi.impl.source.PsiClassReferenceType;
+import com.intellij.psi.*;
import com.intellij.psi.search.DelegatingGlobalSearchScope;
import com.intellij.psi.search.GlobalSearchScope;
import jet.typeinfo.TypeInfoVariance;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
-import org.jetbrains.jet.lang.descriptors.ClassKind;
-import org.jetbrains.jet.lang.descriptors.ConstructorDescriptorImpl;
-import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
-import org.jetbrains.jet.lang.descriptors.DeclarationDescriptorImpl;
-import org.jetbrains.jet.lang.descriptors.DeclarationDescriptorVisitor;
-import org.jetbrains.jet.lang.descriptors.FunctionDescriptor;
-import org.jetbrains.jet.lang.descriptors.Modality;
-import org.jetbrains.jet.lang.descriptors.MutableClassDescriptorLite;
-import org.jetbrains.jet.lang.descriptors.NamedFunctionDescriptorImpl;
-import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
-import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
-import org.jetbrains.jet.lang.descriptors.PropertyGetterDescriptor;
-import org.jetbrains.jet.lang.descriptors.PropertySetterDescriptor;
-import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor;
-import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor;
-import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptorImpl;
-import org.jetbrains.jet.lang.descriptors.VariableDescriptor;
-import org.jetbrains.jet.lang.descriptors.Visibility;
+import org.jetbrains.jet.lang.descriptors.*;
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.java.kt.JetClassAnnotation;
-import org.jetbrains.jet.lang.types.JetStandardClasses;
-import org.jetbrains.jet.lang.types.JetType;
-import org.jetbrains.jet.lang.types.TypeSubstitutor;
-import org.jetbrains.jet.lang.types.TypeUtils;
-import org.jetbrains.jet.lang.types.Variance;
+import org.jetbrains.jet.lang.types.*;
import org.jetbrains.jet.plugin.JetFileType;
import org.jetbrains.jet.rt.signature.JetSignatureAdapter;
import org.jetbrains.jet.rt.signature.JetSignatureExceptionsAdapter;
import org.jetbrains.jet.rt.signature.JetSignatureReader;
import org.jetbrains.jet.rt.signature.JetSignatureVisitor;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
/**
* @author abreslav
@@ -235,7 +190,7 @@ public class JavaDescriptorResolver {
String name = psiClass.getName();
ResolverClassData classData = new ResolverClassData();
- ClassKind kind = psiClass.isInterface() ? ClassKind.TRAIT : ClassKind.CLASS;
+ ClassKind kind = psiClass.isInterface() ? (psiClass.isAnnotationType() ? ClassKind.ANNOTATION_CLASS : ClassKind.TRAIT) : ClassKind.CLASS;
classData.classDescriptor = new MutableClassDescriptorLite(
resolveParentDescriptor(psiClass), kind
);
@@ -288,7 +243,7 @@ public class JavaDescriptorResolver {
// Example:
// class Kotlin() : Java() {}
// abstract public class Java {}
- if (!psiClass.isInterface()) {
+ if (!psiClass.isInterface() || psiClass.isAnnotationType()) {
ConstructorDescriptorImpl constructorDescriptor = new ConstructorDescriptorImpl(
classData.classDescriptor,
Collections.emptyList(),
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java
index a9c3cb04b51..de433513b11 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java
@@ -6,32 +6,16 @@ import com.google.common.collect.Sets;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
-import org.jetbrains.jet.lang.psi.JetParameter;
-import org.jetbrains.jet.lang.resolve.AbstractScopeAdapter;
-import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BindingTrace;
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
-import org.jetbrains.jet.lang.resolve.scopes.RedeclarationHandler;
import org.jetbrains.jet.lang.resolve.scopes.SubstitutingScope;
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
-import org.jetbrains.jet.lang.resolve.scopes.WritableScopeImpl;
import org.jetbrains.jet.lang.resolve.scopes.receivers.ClassReceiver;
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor;
-import org.jetbrains.jet.lang.types.ErrorUtils;
-import org.jetbrains.jet.lang.types.JetType;
-import org.jetbrains.jet.lang.types.TypeConstructor;
-import org.jetbrains.jet.lang.types.TypeConstructorImpl;
-import org.jetbrains.jet.lang.types.TypeProjection;
-import org.jetbrains.jet.lang.types.TypeSubstitutor;
-import org.jetbrains.jet.lang.types.TypeUtils;
+import org.jetbrains.jet.lang.types.*;
import org.jetbrains.jet.resolve.DescriptorRenderer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
/**
* @author Stepan Koltsov
@@ -40,6 +24,8 @@ public class MutableClassDescriptorLite extends MutableDeclarationDescriptor imp
private ConstructorDescriptor primaryConstructor;
private final Set constructors = Sets.newLinkedHashSet();
+ private final List annotations = Lists.newArrayList();
+
private Map innerClassesAndObjects = Maps.newHashMap();
private List typeParameters;
@@ -339,4 +325,8 @@ public class MutableClassDescriptorLite extends MutableDeclarationDescriptor imp
return visitor.visitClassDescriptor(this, data);
}
+ @Override
+ public List getAnnotations() {
+ return annotations;
+ }
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableDeclarationDescriptor.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableDeclarationDescriptor.java
index 405a41a9997..915f25445d5 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableDeclarationDescriptor.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableDeclarationDescriptor.java
@@ -1,9 +1,6 @@
package org.jetbrains.jet.lang.descriptors;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
-
-import java.util.List;
/**
* @author abreslav
@@ -16,11 +13,6 @@ public abstract class MutableDeclarationDescriptor implements DeclarationDescrip
this.containingDeclaration = containingDeclaration;
}
- @Override
- public List getAnnotations() {
- throw new UnsupportedOperationException(); // TODO
- }
-
@NotNull
@Override
public String getName() {
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
index 1e67a337309..7c2d367f74e 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java
@@ -39,7 +39,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD, TRY_KEYWORD, ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD,
WHEN_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, MUL, PLUS, MINUS, EXCL, DIV, PERC, LTEQ,
// TODO GTEQ, foo=x
- EQEQEQ, ARROW, ARROW, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR, SAFE_ACCESS, ELVIS,
+ EQEQEQ, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR, SAFE_ACCESS, ELVIS,
SEMICOLON, RANGE, EQ, MULTEQ, DIVEQ, PERCEQ, PLUSEQ, MINUSEQ, NOT_IN, NOT_IS, //HASH,
COLON
);
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java
index d28a08311ad..435f510354d 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java
@@ -54,6 +54,8 @@ public class TypeHierarchyResolver {
// At this point, there are no loops in the type hierarchy
+ resolveAnnotations();
+
checkSupertypesForConsistency();
// computeSuperclasses();
@@ -364,6 +366,22 @@ public class TypeHierarchyResolver {
}
}
+ private void resolveAnnotations() {
+ AnnotationResolver annotationResolver = new AnnotationResolver(context.getSemanticServices(), context.getTrace());
+ for (Map.Entry entry : context.getClasses().entrySet()) {
+ JetClass jetClass = entry.getKey();
+ MutableClassDescriptor descriptor = entry.getValue();
+ JetModifierList modifierList = jetClass.getModifierList();
+ if (modifierList != null) {
+ descriptor.getAnnotations().addAll(annotationResolver.resolveAnnotations(descriptor.getScopeForSupertypeResolution(), modifierList.getAnnotationEntries()));
+ }
+ }
+ for (Map.Entry entry : context.getObjects().entrySet()) {
+ JetObjectDeclaration objectDeclaration = entry.getKey();
+ MutableClassDescriptor descriptor = entry.getValue();
+ }
+ }
+
private void checkSupertypesForConsistency() {
for (MutableClassDescriptor mutableClassDescriptor : topologicalOrder) {
Multimap multimap = TypeUtils.buildDeepSubstitutionMultimap(mutableClassDescriptor.getDefaultType());
diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.jet b/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.jet
new file mode 100644
index 00000000000..1a6044796ce
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.jet
@@ -0,0 +1,3 @@
+// +JDK
+annotation [java.lang.Deprecated] class my
+annotation Deprecated class my1
diff --git a/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.jet b/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.jet
new file mode 100644
index 00000000000..98bd29f078e
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.jet
@@ -0,0 +1,10 @@
+annotation class my
+annotation class my1(i : Int)
+annotation class my2(i : Int = 0)
+
+my fun foo() {}
+my1 fun foo2() {}
+my1(2) fun foo3() {}
+my2() fun foo4() {}
+my2 fun foo41() {}
+my2(2) fun foo42() {}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/annotations/Deprecated.jet b/compiler/testData/diagnostics/tests/annotations/Deprecated.jet
new file mode 100644
index 00000000000..9cff9bb8dc0
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/annotations/Deprecated.jet
@@ -0,0 +1,7 @@
+// +JDK
+
+import java.lang.Deprecated as deprecated
+
+Deprecated fun foo() {}
+
+deprecated fun foo1() {}
diff --git a/compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.jet b/compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.jet
new file mode 100644
index 00000000000..7611cfa0fcb
--- /dev/null
+++ b/compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.jet
@@ -0,0 +1,5 @@
+val commands = java.util.HashMap Unit>() // multiple errors
+
+class Lifetime{
+ val attached = ArrayList<()->Unit>()
+}
diff --git a/compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.txt b/compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.txt
new file mode 100644
index 00000000000..62c804fc629
--- /dev/null
+++ b/compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.txt
@@ -0,0 +1,88 @@
+JetFile: FunctionTypesAsArguments.jet
+ NAMESPACE_HEADER
+
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('commands')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ DOT_QUALIFIED_EXPRESSION
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('java')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('util')
+ PsiElement(DOT)('.')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('HashMap')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('String')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Unit')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiComment(EOL_COMMENT)('// multiple errors')
+ PsiWhiteSpace('\n\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Lifetime')
+ TYPE_PARAMETER_LIST
+
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('attached')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('ArrayList')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiElement(ARROW)('->')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Unit')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/greatSyntacticShift/functionLiterals.txt b/compiler/testData/psi/greatSyntacticShift/functionLiterals.txt
new file mode 100644
index 00000000000..8d98dcae65a
--- /dev/null
+++ b/compiler/testData/psi/greatSyntacticShift/functionLiterals.txt
@@ -0,0 +1,952 @@
+JetFile: functionLiterals.jet
+ NAMESPACE_HEADER
+
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace('\n')
+ TYPE_PARAMETER_LIST
+
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Bar')
+ PsiWhiteSpace('\n\n')
+ TYPE_PARAMETER_LIST
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ MODIFIER_LIST
+ PsiElement(vararg)('vararg')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Any')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n\n')
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('test')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ DOT_QUALIFIED_EXPRESSION
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(DOT)('.')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ SELF_TYPE
+ PsiElement(This)('This')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ TUPLE_TYPE
+ PsiElement(HASH)('#')
+ PsiElement(LPAR)('(')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ DOT_QUALIFIED_EXPRESSION
+ TUPLE
+ PsiElement(HASH)('#')
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ TUPLE
+ PsiElement(HASH)('#')
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ DOT_QUALIFIED_EXPRESSION
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ DOT_QUALIFIED_EXPRESSION
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Baz')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Baz')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/greatSyntacticShift/functionTypes.txt b/compiler/testData/psi/greatSyntacticShift/functionTypes.txt
new file mode 100644
index 00000000000..fd200c73574
--- /dev/null
+++ b/compiler/testData/psi/greatSyntacticShift/functionTypes.txt
@@ -0,0 +1,1270 @@
+JetFile: functionTypes.jet
+ NAMESPACE_HEADER
+
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n')
+ PsiErrorElement:Expecting namespace or top level declaration
+ PsiElement(package)('package')
+ PsiWhiteSpace(' ')
+ MODIFIER_LIST
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiWhiteSpace(' ')
+ PsiErrorElement:Expecting namespace or top level declaration
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('B')
+ PsiWhiteSpace('\n')
+ TYPE_PARAMETER_LIST
+
+ PsiErrorElement:Expecting namespace or top level declaration
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('XXX')
+ TYPE_PARAMETER_LIST
+
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a1')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('namespace')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a2')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a3')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a31')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a4')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a5')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a6')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(QUEST)('?')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a7')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a8')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiWhiteSpace('\n\n')
+ PsiComment(EOL_COMMENT)('//val a9 : (A, B)')
+ PsiWhiteSpace('\n')
+ PsiComment(EOL_COMMENT)('//val a10 : (B)? -> B')
+ PsiWhiteSpace('\n\n ')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a11')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ NULL
+ PsiElement(null)('null')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a12')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(RPAR)(')')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ NULL
+ PsiElement(null)('null')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a13')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a14')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a15')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a152')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(QUEST)('?')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a151')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiErrorElement:Property getter or setter expected
+ PsiElement(SAFE_ACCESS)('?.')
+ PsiElement(LPAR)('(')
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a16')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a17')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a18')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a19')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('YYY')
+ TYPE_PARAMETER_LIST
+
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a7')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a8')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiWhiteSpace('\n')
+ PsiComment(EOL_COMMENT)('//val a9 : (A, B)')
+ PsiWhiteSpace('\n')
+ PsiComment(EOL_COMMENT)('//val a10 : (B)? -> B')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a11')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ NULL
+ PsiElement(null)('null')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a12')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(RPAR)(')')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ NULL
+ PsiElement(null)('null')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a13')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a14')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('n')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a15')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(QUEST)('?')
+ PsiWhiteSpace(' ')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a152')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ NULLABLE_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(QUEST)('?')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a151')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiErrorElement:Property getter or setter expected
+ PsiElement(SAFE_ACCESS)('?.')
+ PsiElement(LPAR)('(')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a16')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a17')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a18')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ PsiElement(LPAR)('(')
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a19')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ FUNCTION_TYPE
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java b/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java
index 096238cc509..525ab1594c1 100644
--- a/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java
+++ b/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java
@@ -74,11 +74,10 @@ public class TestlibTest extends CodegenTestCase {
ClassFileFactory classFileFactory = session.generate();
- URLClassLoader dependenciesClassLoader = new URLClassLoader(new URL[] { junitJar.toURI().toURL() });
- GeneratedClassLoader loader;
- URLClassLoader parentClassLoader = new URLClassLoader(new URL[]{
- ForTestCompileStdlib.stdlibJarForTests().toURI().toURL()}, dependenciesClassLoader);
- loader = new GeneratedClassLoader(classFileFactory, parentClassLoader);
+ GeneratedClassLoader loader = new GeneratedClassLoader(
+ classFileFactory,
+ new URLClassLoader(new URL[]{ForTestCompileStdlib.stdlibJarForTests().toURI().toURL(), junitJar.toURI().toURL()},
+ TestCase.class.getClassLoader()));
JetTypeMapper typeMapper = new JetTypeMapper(classFileFactory.state.getStandardLibrary(), session.getMyBindingContext());
TestSuite suite = new TestSuite("StandardLibrary");
diff --git a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java
index 0191484e111..48433f12b24 100644
--- a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java
+++ b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java
@@ -111,6 +111,7 @@ public class JetParsingTest extends ParsingTestCase {
String prefix = JetParsingTest.getTestDataDir() + "/psi/";
suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "/", false, factory));
suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "examples", true, factory));
+ suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "greatSyntacticShift", true, factory));
return suite;
}
diff --git a/examples/src/swing/SwingBuilder.kt b/examples/src/swing/SwingBuilder.kt
new file mode 100644
index 00000000000..3fc7cf72bc7
--- /dev/null
+++ b/examples/src/swing/SwingBuilder.kt
@@ -0,0 +1,80 @@
+package kool.swing
+
+import javax.swing.*
+import java.awt.*
+import java.awt.event.*
+
+var Container.south : JComponent
+ get() = throw UnsupportedOperationException()
+ set(comp) {add(comp, BorderLayout.SOUTH)}
+
+var Container.north : JComponent
+ get() = throw UnsupportedOperationException()
+ set(comp) {add(comp, BorderLayout.NORTH)}
+
+var Container.east : JComponent
+ get() = throw UnsupportedOperationException()
+ set(comp) {add(comp, BorderLayout.EAST)}
+
+var Container.west : JComponent
+ get() = throw UnsupportedOperationException()
+ set(comp) {add(comp, BorderLayout.WEST)}
+
+var Container.center : JComponent
+ get() = throw UnsupportedOperationException()
+ set(comp) {add(comp, BorderLayout.CENTER)}
+
+class KFrame(title : String, init : KFrame.() -> Unit) : JFrame(title) {
+ {
+ this.init()
+ }
+
+ fun T.toSouth() : T {
+ this@KFrame.add(this, BorderLayout.SOUTH)
+ return this
+ }
+}
+
+
+fun JPanel(init : JPanel.() -> Unit) : JPanel {
+ val p = JPanel()
+ p.init()
+ return p
+}
+
+//fun KFrame(title : String, init : JFrame.() -> Unit) : JFrame {
+// val result = JFrame(title)
+// result.init()
+// return result
+//}
+
+fun JButton(text : String, action : (ActionEvent) -> Unit) : JButton {
+ val result = JButton(text)
+ result.addActionListener(object : ActionListener {
+ override fun actionPerformed(e: ActionEvent?) {
+ action(e.sure())
+ }
+ })
+ return result
+}
+
+var JFrame.title : String
+ get() = getTitle().sure()
+ set(t) {setTitle(t)}
+
+var JFrame.size : #(Int, Int)
+ get() = #(getSize().sure().getWidth().int, getSize().sure().getHeight().int)
+ set(dim) {setSize(Dimension(dim._1, dim._2))}
+
+var JFrame.height : Int
+ get() = getSize().sure().getHeight().int
+ set(h) {setSize(width, h)}
+
+var JFrame.width : Int
+ get() = getSize().sure().getWidth().int
+ set(w) {setSize(height, w)}
+
+var JFrame.defaultCloseOperation : Int
+ get() = getDefaultCloseOperation()
+ set(def) {setDefaultCloseOperation(def)}
+
diff --git a/examples/src/swing/SwingBuilderTest.kt b/examples/src/swing/SwingBuilderTest.kt
new file mode 100644
index 00000000000..b8030408b03
--- /dev/null
+++ b/examples/src/swing/SwingBuilderTest.kt
@@ -0,0 +1,29 @@
+package demo
+
+import kool.swing.*
+import javax.swing.*
+
+val greeting = "Hello,\n\nEnter some text here!"
+
+fun main(args : Array) {
+ KFrame("Demo") {
+ height = 100
+ width = 100
+ defaultCloseOperation = JFrame.EXIT_ON_CLOSE
+
+ val text = JTextArea(greeting)
+ center = text
+
+ val southPanel = JPanel {
+ west = JButton("Clear") {
+ text.setText("")
+ }
+
+ east = JButton("Restore") {
+ text.setText(greeting)
+ }
+ }
+
+ }.show()
+
+}
\ No newline at end of file
diff --git a/idea/src/org/jetbrains/jet/plugin/completion/JetKeywordCompletionContributor.java b/idea/src/org/jetbrains/jet/plugin/completion/JetKeywordCompletionContributor.java
index af001ad3809..0e6b5eb5570 100644
--- a/idea/src/org/jetbrains/jet/plugin/completion/JetKeywordCompletionContributor.java
+++ b/idea/src/org/jetbrains/jet/plugin/completion/JetKeywordCompletionContributor.java
@@ -18,12 +18,16 @@ import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.psi.*;
+import org.jetbrains.jet.lexer.JetToken;
import org.jetbrains.jet.plugin.completion.handlers.JetFunctionInsertHandler;
import org.jetbrains.jet.plugin.completion.handlers.JetKeywordInsertHandler;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import static org.jetbrains.jet.lexer.JetTokens.*;
+
/**
* A keyword contributor for Kotlin
*
@@ -42,7 +46,7 @@ public class JetKeywordCompletionContributor extends CompletionContributor {
new LeftNeighbour(new TextFilter("."))
));
- private final static List FUNCTION_KEYWORDS = Lists.newArrayList("get", "set");
+ private final static List FUNCTION_KEYWORDS = Lists.newArrayList(GET_KEYWORD.toString(), SET_KEYWORD.toString());
private static class CommentFilter implements ElementFilter {
@Override
@@ -169,29 +173,58 @@ public class JetKeywordCompletionContributor extends CompletionContributor {
public JetKeywordCompletionContributor() {
registerScopeKeywordsCompletion(new InTopFilter(),
- "abstract", "class", "enum", "final", "fun", "get", "import", "inline",
- "internal", "open", "package", "private", "protected", "public", "set",
- "trait", "type", "val", "var");
+ ABSTRACT_KEYWORD, CLASS_KEYWORD, ENUM_KEYWORD,
+ FINAL_KEYWORD, FUN_KEYWORD, GET_KEYWORD,
+ IMPORT_KEYWORD, INLINE_KEYWORD, INTERNAL_KEYWORD,
+ OPEN_KEYWORD, PACKAGE_KEYWORD, PRIVATE_KEYWORD,
+ PROTECTED_KEYWORD, PUBLIC_KEYWORD, SET_KEYWORD,
+ TRAIT_KEYWORD, TYPE_KEYWORD, VAL_KEYWORD,
+ VAR_KEYWORD);
registerScopeKeywordsCompletion(new InClassBodyFilter(),
- "abstract", "class", "enum", "final", "fun", "get", "inline", "internal",
- "object", "open", "override", "private", "protected", "public", "set", "trait",
- "type", "val", "var");
+ ABSTRACT_KEYWORD, CLASS_KEYWORD, ENUM_KEYWORD,
+ FINAL_KEYWORD, FUN_KEYWORD, GET_KEYWORD,
+ INLINE_KEYWORD, INTERNAL_KEYWORD, OBJECT_KEYWORD,
+ OPEN_KEYWORD, OVERRIDE_KEYWORD, PRIVATE_KEYWORD,
+ PROTECTED_KEYWORD, PUBLIC_KEYWORD, SET_KEYWORD,
+ TRAIT_KEYWORD, TYPE_KEYWORD, VAL_KEYWORD,
+ VAR_KEYWORD);
registerScopeKeywordsCompletion(new InNonClassBlockFilter(),
- "as", "break", "by", "catch", "class", "continue", "default", "do", "else",
- "enum", "false", "finally", "for", "fun", "get", "if", "in", "inline",
- "internal", "is", "null", "object", "private", "protected", "public", "ref",
- "return", "set", "super", "This", "this", "throw", "trait", "true", "try",
- "type", "val", "var", "vararg", "when", "where", "while");
+ AS_KEYWORD, BREAK_KEYWORD, BY_KEYWORD,
+ CATCH_KEYWORD, CLASS_KEYWORD, CONTINUE_KEYWORD,
+ DO_KEYWORD, ELSE_KEYWORD, ENUM_KEYWORD,
+ FALSE_KEYWORD, FINALLY_KEYWORD, FOR_KEYWORD,
+ FUN_KEYWORD, GET_KEYWORD, IF_KEYWORD,
+ IN_KEYWORD, INLINE_KEYWORD, INTERNAL_KEYWORD,
+ IS_KEYWORD, NULL_KEYWORD, OBJECT_KEYWORD,
+ PRIVATE_KEYWORD, PROTECTED_KEYWORD, PUBLIC_KEYWORD,
+ RETURN_KEYWORD, SET_KEYWORD, SUPER_KEYWORD,
+ CAPITALIZED_THIS_KEYWORD, THIS_KEYWORD, THROW_KEYWORD,
+ TRAIT_KEYWORD, TRUE_KEYWORD, TRY_KEYWORD,
+ TYPE_KEYWORD, VAL_KEYWORD, VAR_KEYWORD,
+ VARARG_KEYWORD, WHEN_KEYWORD, WHERE_KEYWORD,
+ WHILE_KEYWORD);
- registerScopeKeywordsCompletion(new InPropertyFilter(), "else", "false", "if", "null", "this", "true");
+ registerScopeKeywordsCompletion(new InPropertyFilter(),
+ ELSE_KEYWORD, FALSE_KEYWORD, IF_KEYWORD,
+ NULL_KEYWORD, THIS_KEYWORD, TRUE_KEYWORD);
- registerScopeKeywordsCompletion(new InParametersFilter(), "ref", "out");
+ registerScopeKeywordsCompletion(new InParametersFilter(), OUT_KEYWORD);
}
- private void registerScopeKeywordsCompletion(final ElementFilter placeFilter, String... keywords) {
- extend(CompletionType.BASIC, getPlacePattern(placeFilter), new KeywordsCompletionProvider(keywords));
+ private void registerScopeKeywordsCompletion(final ElementFilter placeFilter, JetToken... keywords) {
+ extend(CompletionType.BASIC, getPlacePattern(placeFilter),
+ new KeywordsCompletionProvider(convertTokensToStrings(keywords)));
+ }
+
+ private static String[] convertTokensToStrings(JetToken... keywords) {
+ final ArrayList strings = new ArrayList(keywords.length);
+ for (JetToken keyword : keywords) {
+ strings.add(keyword.toString());
+ }
+
+ return strings.toArray(new String[strings.size()]);
}
private static ElementPattern getPlacePattern(final ElementFilter placeFilter) {
diff --git a/idea/testData/completion/keywords/InFunctionScope.kt b/idea/testData/completion/keywords/InFunctionScope.kt
index 1f51914c8e1..9e3f6aebb2b 100644
--- a/idea/testData/completion/keywords/InFunctionScope.kt
+++ b/idea/testData/completion/keywords/InFunctionScope.kt
@@ -10,7 +10,6 @@ fun foo() {
// EXIST: catch
// EXIST: class
// EXIST: continue
-// EXIST: default
// EXIST: do
// EXIST: else
// EXIST: enum
@@ -35,7 +34,6 @@ fun foo() {
// EXIST: private
// EXIST: protected
// EXIST: public
-// EXIST: ref
// EXIST: return
// EXIST: set
// EXIST: super
diff --git a/idea/testData/completion/keywords/InParametersList.kt b/idea/testData/completion/keywords/InParametersList.kt
index 38b0beec93c..936832f8078 100644
--- a/idea/testData/completion/keywords/InParametersList.kt
+++ b/idea/testData/completion/keywords/InParametersList.kt
@@ -10,7 +10,6 @@ fun test() {
// ABSENT: catch
// ABSENT: class
// ABSENT: continue
-// ABSENT: default
// ABSENT: do
// ABSENT: else
// ABSENT: enum
@@ -35,7 +34,6 @@ fun test() {
// ABSENT: private
// ABSENT: protected
// ABSENT: public
-// EXIST: ref
// ABSENT: return
// ABSENT: set
// ABSENT: super
diff --git a/idea/testData/completion/keywords/InTypeScope.kt b/idea/testData/completion/keywords/InTypeScope.kt
index e83a1f01f90..71218fbdc50 100644
--- a/idea/testData/completion/keywords/InTypeScope.kt
+++ b/idea/testData/completion/keywords/InTypeScope.kt
@@ -10,7 +10,6 @@ fun foo() {
// EXIST: catch
// EXIST: class
// EXIST: continue
-// EXIST: default
// EXIST: do
// EXIST: else
// EXIST: enum
@@ -35,7 +34,6 @@ fun foo() {
// EXIST: private
// EXIST: protected
// EXIST: public
-// EXIST: ref
// EXIST: return
// EXIST: set
// EXIST: super
diff --git a/jdk-headers/.idea/.name b/jdk-headers/.idea/.name
new file mode 100644
index 00000000000..afd94ca02dc
--- /dev/null
+++ b/jdk-headers/.idea/.name
@@ -0,0 +1 @@
+jdk-headers
\ No newline at end of file
diff --git a/jdk-headers/.idea/ant.xml b/jdk-headers/.idea/ant.xml
new file mode 100644
index 00000000000..2581ca3fe84
--- /dev/null
+++ b/jdk-headers/.idea/ant.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/jdk-headers/.idea/artifacts/jdk_headers_jar.xml b/jdk-headers/.idea/artifacts/jdk_headers_jar.xml
new file mode 100644
index 00000000000..f2e8de23b4d
--- /dev/null
+++ b/jdk-headers/.idea/artifacts/jdk_headers_jar.xml
@@ -0,0 +1,13 @@
+
+
+ $PROJECT_DIR$
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jdk-headers/.idea/compiler.xml b/jdk-headers/.idea/compiler.xml
new file mode 100644
index 00000000000..a1b41c52c72
--- /dev/null
+++ b/jdk-headers/.idea/compiler.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jdk-headers/.idea/copyright/profiles_settings.xml b/jdk-headers/.idea/copyright/profiles_settings.xml
new file mode 100644
index 00000000000..3572571ad83
--- /dev/null
+++ b/jdk-headers/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jdk-headers/.idea/encodings.xml b/jdk-headers/.idea/encodings.xml
new file mode 100644
index 00000000000..e206d70d859
--- /dev/null
+++ b/jdk-headers/.idea/encodings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/jdk-headers/.idea/misc.xml b/jdk-headers/.idea/misc.xml
new file mode 100644
index 00000000000..97320410eec
--- /dev/null
+++ b/jdk-headers/.idea/misc.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/jdk-headers/.idea/modules.xml b/jdk-headers/.idea/modules.xml
new file mode 100644
index 00000000000..4bfabd95716
--- /dev/null
+++ b/jdk-headers/.idea/modules.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/jdk-headers/.idea/scopes/scope_settings.xml b/jdk-headers/.idea/scopes/scope_settings.xml
new file mode 100644
index 00000000000..922003b8433
--- /dev/null
+++ b/jdk-headers/.idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jdk-headers/.idea/uiDesigner.xml b/jdk-headers/.idea/uiDesigner.xml
new file mode 100644
index 00000000000..3b000203088
--- /dev/null
+++ b/jdk-headers/.idea/uiDesigner.xml
@@ -0,0 +1,125 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
diff --git a/jdk-headers/.idea/vcs.xml b/jdk-headers/.idea/vcs.xml
new file mode 100644
index 00000000000..def6a6a1845
--- /dev/null
+++ b/jdk-headers/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/jdk-headers/jdk-headers.iml b/jdk-headers/jdk-headers.iml
new file mode 100644
index 00000000000..d5c07432750
--- /dev/null
+++ b/jdk-headers/jdk-headers.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jdk-headers/src/META-INF/MANIFEST.MF b/jdk-headers/src/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..59499bce4a2
--- /dev/null
+++ b/jdk-headers/src/META-INF/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/jdk-headers/src/java/lang/Iterable.kt b/jdk-headers/src/java/lang/Iterable.kt
new file mode 100644
index 00000000000..cd19f19e5d3
--- /dev/null
+++ b/jdk-headers/src/java/lang/Iterable.kt
@@ -0,0 +1,5 @@
+package java.lang
+
+public trait Iterable {
+ fun iterator() : java.util.Iterator
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/AbstractCollection.kt b/jdk-headers/src/java/util/AbstractCollection.kt
new file mode 100644
index 00000000000..d95adaeaed9
--- /dev/null
+++ b/jdk-headers/src/java/util/AbstractCollection.kt
@@ -0,0 +1,17 @@
+package java.util
+abstract public open class AbstractCollection protected () : java.util.Collection, java.lang.Object {
+ abstract override public fun iterator() : java.util.Iterator
+ abstract override public fun size() : Int
+ override public fun isEmpty() : Boolean {}
+ override public fun contains(o : Any?) : Boolean {}
+ override public fun toArray() : Array {}
+ override public fun toArray(a : Array) : Array {}
+ override public fun add(e : E) : Boolean {}
+ override public fun remove(o : Any?) : Boolean {}
+ override public fun containsAll(c : java.util.Collection<*>) : Boolean {}
+ override public fun addAll(c : java.util.Collection) : Boolean {}
+ override public fun removeAll(c : java.util.Collection<*>) : Boolean {}
+ override public fun retainAll(c : java.util.Collection<*>) : Boolean {}
+ override public fun clear() : Unit {}
+//override public fun toString() : java.lang.String {}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/AbstractList.kt b/jdk-headers/src/java/util/AbstractList.kt
new file mode 100644
index 00000000000..4c94916b6d2
--- /dev/null
+++ b/jdk-headers/src/java/util/AbstractList.kt
@@ -0,0 +1,20 @@
+package java.util
+abstract public open class AbstractList protected () : java.util.AbstractCollection(), java.util.List {
+ override public fun add(e : E) : Boolean {}
+ abstract override public fun get(index : Int) : E
+ override public fun set(index : Int, element : E) : E {}
+ override public fun add(index : Int, element : E) : Unit {}
+ override public fun remove(index : Int) : E {}
+ override public fun indexOf(o : Any?) : Int {}
+ override public fun lastIndexOf(o : Any?) : Int {}
+ override public fun clear() : Unit {}
+ override public fun addAll(index : Int, c : java.util.Collection) : Boolean {}
+ override public fun iterator() : java.util.Iterator {}
+ override public fun listIterator() : java.util.ListIterator {}
+ override public fun listIterator(index : Int) : java.util.ListIterator {}
+ override public fun subList(fromIndex : Int, toIndex : Int) : java.util.List {}
+// override public fun equals(o : Any?) : Boolean
+// override public fun hashCode() : Int
+ open protected fun removeRange(fromIndex : Int, toIndex : Int) : Unit {}
+ protected var modCount : Int = 0
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/AbstractMap.kt b/jdk-headers/src/java/util/AbstractMap.kt
new file mode 100644
index 00000000000..98e17b74b72
--- /dev/null
+++ b/jdk-headers/src/java/util/AbstractMap.kt
@@ -0,0 +1,21 @@
+package java.util
+
+import java.util.Map.Entry
+
+abstract public open class AbstractMap protected () : java.util.Map, java.lang.Object {
+ override public fun size() : Int {}
+ override public fun isEmpty() : Boolean {}
+ override public fun containsValue(value : Any?) : Boolean {}
+ override public fun containsKey(key : Any?) : Boolean {}
+ override public fun get(key : Any?) : V? {}
+ override public fun put(key : K, value : V) : V? {}
+ override public fun remove(key : Any?) : V? {}
+ override public fun putAll(m : java.util.Map) : Unit {}
+ override public fun clear() : Unit {}
+ override public fun keySet() : java.util.Set {}
+ override public fun values() : java.util.Collection {}
+ abstract override public fun entrySet() : java.util.Set>
+ //override public fun equals(o : Any?) : Boolean
+ //override public fun hashCode() : Int
+ //override public fun toString() : java.lang.String?
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/AbstractSequentialList.kt b/jdk-headers/src/java/util/AbstractSequentialList.kt
new file mode 100644
index 00000000000..2318cc39c2e
--- /dev/null
+++ b/jdk-headers/src/java/util/AbstractSequentialList.kt
@@ -0,0 +1,10 @@
+package java.util
+abstract public open class AbstractSequentialList protected () : java.util.AbstractList(), java.lang.Object {
+ override public fun get(index : Int) : E {}
+ override public fun set(index : Int, element : E) : E {}
+ override public fun add(index : Int, element : E) : Unit {}
+ override public fun remove(index : Int) : E {}
+ override public fun addAll(index : Int, c : java.util.Collection) : Boolean {}
+ override public fun iterator() : java.util.Iterator {}
+ abstract override public fun listIterator(index : Int) : java.util.ListIterator {}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/AbstractSet.kt b/jdk-headers/src/java/util/AbstractSet.kt
new file mode 100644
index 00000000000..bf6e6b83259
--- /dev/null
+++ b/jdk-headers/src/java/util/AbstractSet.kt
@@ -0,0 +1,6 @@
+package java.util
+abstract public open class AbstractSet protected () : java.util.AbstractCollection(), java.util.Set, java.lang.Object {
+// override public fun equals(o : Any?) : Boolean
+// override public fun hashCode() : Int
+ override public fun removeAll(c : java.util.Collection<*>) : Boolean {}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/ArrayList.kt b/jdk-headers/src/java/util/ArrayList.kt
new file mode 100644
index 00000000000..5c4c1e8ddb4
--- /dev/null
+++ b/jdk-headers/src/java/util/ArrayList.kt
@@ -0,0 +1,37 @@
+package java.util
+public open class ArrayList(c : java.util.Collection) : java.util.AbstractList(),
+ java.util.List,
+ java.util.RandomAccess,
+ java.lang.Cloneable,
+ java.io.Serializable {
+ public this() {}
+ public this(initialCapacity : Int) {}
+ open public fun trimToSize() : Unit {}
+ open public fun ensureCapacity(minCapacity : Int) : Unit {}
+ override public fun size() : Int {}
+ override public fun isEmpty() : Boolean {}
+ override public fun contains(o : Any?) : Boolean {}
+ override public fun indexOf(o : Any?) : Int {}
+ override public fun lastIndexOf(o : Any?) : Int {}
+ override public fun clone() : java.lang.Object {}
+ override public fun toArray() : Array {}
+ override public fun toArray(a : Array) : Array {}
+ override public fun get(index : Int) : E {}
+ override public fun set(index : Int, element : E) : E {}
+ override public fun add(e : E) : Boolean {}
+ override public fun add(index : Int, element : E) : Unit {}
+ override public fun remove(index : Int) : E {}
+ override public fun remove(o : Any?) : Boolean {}
+ override public fun clear() : Unit {}
+ override public fun addAll(c : java.util.Collection) : Boolean {}
+ override public fun addAll(index : Int, c : java.util.Collection) : Boolean {}
+ override protected fun removeRange(fromIndex : Int, toIndex : Int) : Unit {}
+// class object {
+// open public fun init() : ArrayList {
+// return __
+// }
+// open public fun init(c : java.util.Collection?) : ArrayList {
+// return __
+// }
+// }
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Collection.kt b/jdk-headers/src/java/util/Collection.kt
new file mode 100644
index 00000000000..c852e48f1fd
--- /dev/null
+++ b/jdk-headers/src/java/util/Collection.kt
@@ -0,0 +1,20 @@
+package java.util
+public trait Collection : java.lang.Iterable {
+ open fun size() : Int
+ open fun isEmpty() : Boolean
+ open fun contains(o : Any?) : Boolean
+ override fun iterator() : java.util.Iterator
+ open fun toArray() : Array
+ // a : Array to emulate Java's array covariance
+ open fun toArray(a : Array) : Array
+ open fun add(e : E) : Boolean
+ open fun remove(o : Any?) : Boolean
+ open fun containsAll(c : java.util.Collection<*>) : Boolean
+ open fun addAll(c : java.util.Collection) : Boolean
+ open fun removeAll(c : java.util.Collection<*>) : Boolean
+ open fun retainAll(c : java.util.Collection<*>) : Boolean
+ open fun clear() : Unit
+
+// override fun equals(o : Any?) : Boolean
+// override fun hashCode() : Int
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Deque.kt b/jdk-headers/src/java/util/Deque.kt
new file mode 100644
index 00000000000..5282d85c672
--- /dev/null
+++ b/jdk-headers/src/java/util/Deque.kt
@@ -0,0 +1,30 @@
+package java.util
+public trait Deque : java.util.Queue {
+ open fun addFirst(e : E) : Unit
+ open fun addLast(e : E) : Unit
+ open fun offerFirst(e : E) : Boolean
+ open fun offerLast(e : E) : Boolean
+ open fun removeFirst() : E
+ open fun removeLast() : E
+ open fun pollFirst() : E?
+ open fun pollLast() : E?
+ open fun getFirst() : E
+ open fun getLast() : E
+ open fun peekFirst() : E?
+ open fun peekLast() : E?
+ open fun removeFirstOccurrence(o : Any?) : Boolean
+ open fun removeLastOccurrence(o : Any?) : Boolean
+ override fun add(e : E) : Boolean
+ override fun offer(e : E) : Boolean
+ override fun remove() : E
+ override fun poll() : E?
+ override fun element() : E
+ override fun peek() : E?
+ open fun push(e : E) : Unit
+ open fun pop() : E
+ override fun remove(o : Any?) : Boolean
+ override fun contains(o : Any?) : Boolean
+ override public fun size() : Int
+ override fun iterator() : java.util.Iterator
+ open fun descendingIterator() : java.util.Iterator
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Enumeration.kt b/jdk-headers/src/java/util/Enumeration.kt
new file mode 100644
index 00000000000..127a4b69ca9
--- /dev/null
+++ b/jdk-headers/src/java/util/Enumeration.kt
@@ -0,0 +1,5 @@
+package java.util
+public trait Enumeration {
+ open fun hasMoreElements() : Boolean
+ open fun nextElement() : E
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/HashMap.kt b/jdk-headers/src/java/util/HashMap.kt
new file mode 100644
index 00000000000..97ee82d5368
--- /dev/null
+++ b/jdk-headers/src/java/util/HashMap.kt
@@ -0,0 +1,24 @@
+package java.util
+import java.io.*
+public open class HashMap(m : java.util.Map) : java.util.AbstractMap(),
+ java.util.Map,
+ java.lang.Cloneable,
+ java.io.Serializable,
+ java.lang.Object {
+ public this() {}
+ public this(initialCapacity : Int) {}
+ public this(initialCapacity : Int, loadFactor : Float) {}
+ override public fun size() : Int {}
+ override public fun isEmpty() : Boolean {}
+ override public fun get(key : Any?) : V? {}
+ override public fun containsKey(key : Any?) : Boolean {}
+ override public fun put(key : K, value : V) : V? {}
+ override public fun putAll(m : java.util.Map) : Unit {}
+ override public fun remove(key : Any?) : V? {}
+ override public fun clear() : Unit {}
+ override public fun containsValue(value : Any?) : Boolean {}
+ override public fun clone() : Any? {}
+ override public fun keySet() : java.util.Set {}
+ override public fun values() : java.util.Collection {}
+ override public fun entrySet() : java.util.Set> {}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/HashSet.kt b/jdk-headers/src/java/util/HashSet.kt
new file mode 100644
index 00000000000..0017654f512
--- /dev/null
+++ b/jdk-headers/src/java/util/HashSet.kt
@@ -0,0 +1,40 @@
+package java.util
+public open class HashSet(c : java.util.Collection) : java.util.AbstractSet(),
+ java.util.Set,
+ java.lang.Cloneable,
+ java.io.Serializable,
+ java.lang.Object {
+ public this() {}
+ public this(initialCapacity : Int) {}
+ public this(initialCapacity : Int, loadFactor : Float) {}
+ override public fun iterator() : java.util.Iterator {}
+ override public fun size() : Int {}
+ override public fun isEmpty() : Boolean {}
+ override public fun contains(o : Any?) : Boolean {}
+ override public fun add(e : E) : Boolean {}
+ override public fun remove(o : Any?) : Boolean {}
+ override public fun clear() : Unit {}
+ override public fun clone() : Any? {}
+//class object {
+//open public fun init() : HashSet {
+//val __ = HashSet(0, null, null)
+//return __
+//}
+//open public fun init(c : java.util.Collection?) : HashSet {
+//val __ = HashSet(0, null, null)
+//return __
+//}
+//open public fun init(initialCapacity : Int, loadFactor : Float) : HashSet {
+//val __ = HashSet(0, null, null)
+//return __
+//}
+//open public fun init(initialCapacity : Int) : HashSet {
+//val __ = HashSet(0, null, null)
+//return __
+//}
+//open fun init(initialCapacity : Int, loadFactor : Float, dummy : Boolean) : HashSet {
+//val __ = HashSet(0, null, null)
+//return __
+//}
+//}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Iterator.kt b/jdk-headers/src/java/util/Iterator.kt
new file mode 100644
index 00000000000..935228ebd73
--- /dev/null
+++ b/jdk-headers/src/java/util/Iterator.kt
@@ -0,0 +1,7 @@
+package java.util
+
+public trait Iterator {
+ fun hasNext() : Boolean
+ fun next() : E
+ fun remove() : Unit
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/LinkedHashMap.kt b/jdk-headers/src/java/util/LinkedHashMap.kt
new file mode 100644
index 00000000000..e81d937d453
--- /dev/null
+++ b/jdk-headers/src/java/util/LinkedHashMap.kt
@@ -0,0 +1,34 @@
+package java.util
+import java.io.*
+public open class LinkedHashMap(m : java.util.Map) : java.util.HashMap(), java.util.Map, java.lang.Object {
+ public this(initialCapacity : Int, loadFactor : Float) {}
+ public this(initialCapacity : Int) {}
+ public this() {}
+
+ override public fun containsValue(value : Any?) : Boolean {}
+ override public fun get(key : Any?) : V? {}
+ override public fun clear() : Unit {}
+ open protected fun removeEldestEntry(eldest : java.util.Map.Entry) : Boolean {}
+ //class object {
+ //open public fun init(initialCapacity : Int, loadFactor : Float) : LinkedHashMap {
+ //val __ = LinkedHashMap(0, null, false)
+ //return __
+ //}
+ //open public fun init(initialCapacity : Int) : LinkedHashMap {
+ //val __ = LinkedHashMap(0, null, false)
+ //return __
+ //}
+ //open public fun init() : LinkedHashMap {
+ //val __ = LinkedHashMap(0, null, false)
+ //return __
+ //}
+ //open public fun init(m : java.util.Map?) : LinkedHashMap {
+ //val __ = LinkedHashMap(0, null, false)
+ //return __
+ //}
+ //open public fun init(initialCapacity : Int, loadFactor : Float, accessOrder : Boolean) : LinkedHashMap {
+ //val __ = LinkedHashMap(0, null, false)
+ //return __
+ //}
+ //}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/LinkedHashSet.kt b/jdk-headers/src/java/util/LinkedHashSet.kt
new file mode 100644
index 00000000000..4f85a4bdb0f
--- /dev/null
+++ b/jdk-headers/src/java/util/LinkedHashSet.kt
@@ -0,0 +1,10 @@
+package java.util
+public open class LinkedHashSet(c : java.util.Collection) : java.util.HashSet(c),
+ java.util.Set,
+ java.lang.Cloneable,
+ java.io.Serializable,
+ java.lang.Object {
+ public this(initialCapacity : Int, loadFactor : Float) {}
+ public this(initialCapacity : Int) {}
+ public this() {}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/LinkedList.kt b/jdk-headers/src/java/util/LinkedList.kt
new file mode 100644
index 00000000000..a4a0c4f83da
--- /dev/null
+++ b/jdk-headers/src/java/util/LinkedList.kt
@@ -0,0 +1,54 @@
+package java.util
+public open class LinkedList(c : java.util.Collection) : java.util.AbstractSequentialList(),
+ java.util.List,
+ java.util.Deque,
+ java.lang.Cloneable,
+ java.io.Serializable,
+ java.lang.Object {
+ public this() {}
+
+ override public fun getFirst() : E {}
+ override public fun getLast() : E {}
+ override public fun removeFirst() : E {}
+ override public fun removeLast() : E {}
+ override public fun addFirst(e : E) : Unit {}
+ override public fun addLast(e : E) : Unit {}
+ override public fun contains(o : Any?) : Boolean {}
+ override public fun size() : Int {}
+ override public fun add(e : E) : Boolean {}
+ override public fun remove(o : Any?) : Boolean {}
+ override public fun addAll(c : java.util.Collection) : Boolean {}
+ override public fun addAll(index : Int, c : java.util.Collection) : Boolean {}
+ override public fun clear() : Unit {}
+ override public fun get(index : Int) : E {}
+ override public fun set(index : Int, element : E) : E {}
+ override public fun add(index : Int, element : E) : Unit {}
+ override public fun remove(index : Int) : E {}
+ override public fun indexOf(o : Any?) : Int {}
+ override public fun lastIndexOf(o : Any?) : Int {}
+ override public fun peek() : E? {}
+ override public fun element() : E {}
+ override public fun poll() : E? {}
+ override public fun remove() : E {}
+ override public fun offer(e : E) : Boolean {}
+ override public fun offerFirst(e : E) : Boolean {}
+ override public fun offerLast(e : E) : Boolean {}
+ override public fun peekFirst() : E? {}
+ override public fun peekLast() : E? {}
+ override public fun pollFirst() : E? {}
+ override public fun pollLast() : E? {}
+ override public fun push(e : E) : Unit {}
+ override public fun pop() : E {}
+ override public fun removeFirstOccurrence(o : Any?) : Boolean {}
+ override public fun removeLastOccurrence(o : Any?) : Boolean {}
+ override public fun listIterator(index : Int) : java.util.ListIterator {}
+ override public fun descendingIterator() : java.util.Iterator {}
+ override public fun clone() : Any? {}
+ override public fun toArray() : Array {}
+ override public fun toArray(a : Array) : Array {}
+//class object {
+//open public fun init(c : java.util.Collection?) : LinkedList {
+//return __
+//}
+//}
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/List.kt b/jdk-headers/src/java/util/List.kt
new file mode 100644
index 00000000000..741ea472522
--- /dev/null
+++ b/jdk-headers/src/java/util/List.kt
@@ -0,0 +1,29 @@
+package java.util
+public trait List : java.util.Collection {
+ override fun size() : Int
+ override fun isEmpty() : Boolean
+ override fun contains(o : Any?) : Boolean
+ override fun iterator() : java.util.Iterator
+ override fun toArray() : Array
+ // Simulate Java's array covariance
+ override fun toArray(a : Array) : Array
+ override fun add(e : E) : Boolean
+ override fun remove(o : Any?) : Boolean
+ override fun containsAll(c : java.util.Collection<*>) : Boolean
+ override fun addAll(c : java.util.Collection) : Boolean
+ open fun addAll(index : Int, c : java.util.Collection) : Boolean
+ override fun removeAll(c : java.util.Collection<*>) : Boolean
+ override fun retainAll(c : java.util.Collection<*>) : Boolean
+ override fun clear() : Unit
+// override fun equals(o : Any?) : Boolean
+// override fun hashCode() : Int
+ open fun get(index : Int) : E
+ open fun set(index : Int, element : E) : E
+ open fun add(index : Int, element : E) : Unit
+ open fun remove(index : Int) : E
+ open fun indexOf(o : Any?) : Int
+ open fun lastIndexOf(o : Any?) : Int
+ open fun listIterator() : java.util.ListIterator
+ open fun listIterator(index : Int) : java.util.ListIterator
+ open fun subList(fromIndex : Int, toIndex : Int) : java.util.List
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Map.kt b/jdk-headers/src/java/util/Map.kt
new file mode 100644
index 00000000000..fc28c9fe226
--- /dev/null
+++ b/jdk-headers/src/java/util/Map.kt
@@ -0,0 +1,28 @@
+package java.util
+
+public trait Map {
+ open fun size() : Int
+ open fun isEmpty() : Boolean
+ open fun containsKey(key : Any?) : Boolean
+ open fun containsValue(value : Any?) : Boolean
+ open fun get(key : Any?) : V?
+ open fun put(key : K, value : V) : V?
+ open fun remove(key : Any?) : V?
+ open fun putAll(m : java.util.Map) : Unit
+ open fun clear() : Unit
+ open fun keySet() : java.util.Set
+ open fun values() : java.util.Collection
+ open fun entrySet() : java.util.Set>
+// open fun equals(o : Any?) : Boolean
+// open fun hashCode() : Int
+
+ class object {
+ trait Entry {
+ open fun getKey() : K
+ open fun getValue() : V
+ open fun setValue(value : V) : V
+// open fun equals(o : Any?) : Boolean
+// open fun hashCode() : Int
+ }
+ }
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Queue.kt b/jdk-headers/src/java/util/Queue.kt
new file mode 100644
index 00000000000..0a4eb0ecbfb
--- /dev/null
+++ b/jdk-headers/src/java/util/Queue.kt
@@ -0,0 +1,9 @@
+package java.util
+public trait Queue : java.util.Collection {
+ override fun add(e : E) : Boolean
+ open fun offer(e : E) : Boolean
+ open fun remove() : E
+ open fun poll() : E?
+ open fun element() : E
+ open fun peek() : E?
+}
\ No newline at end of file
diff --git a/jdk-headers/src/java/util/Set.kt b/jdk-headers/src/java/util/Set.kt
new file mode 100644
index 00000000000..f1c70a6436d
--- /dev/null
+++ b/jdk-headers/src/java/util/Set.kt
@@ -0,0 +1,21 @@
+package java.util
+public trait Set : java.util.Collection {
+ override fun size() : Int
+ override fun isEmpty() : Boolean
+ override fun contains(o : Any?) : Boolean
+ override fun iterator() : java.util.Iterator
+ override fun toArray() : Array
+
+ // Simulate Java's array covariance
+ override fun toArray(a : Array) : Array
+ override fun add(e : E) : Boolean
+ override fun remove(o : Any?) : Boolean
+ override fun containsAll(c : java.util.Collection<*>) : Boolean
+ override fun addAll(c : java.util.Collection) : Boolean
+ override fun retainAll(c : java.util.Collection<*>) : Boolean
+ override fun removeAll(c : java.util.Collection<*>) : Boolean
+ override fun clear() : Unit
+// override fun equals(o : Any?) : Boolean
+// override fun hashCode() : Int
+}
+
diff --git a/jdk-headers/test/test.iml b/jdk-headers/test/test.iml
new file mode 100644
index 00000000000..b13953ece7d
--- /dev/null
+++ b/jdk-headers/test/test.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/update_dependencies.xml b/update_dependencies.xml
index b79e133604a..97628414f9b 100644
--- a/update_dependencies.xml
+++ b/update_dependencies.xml
@@ -32,6 +32,9 @@
+
+
+