PsiElement for receiver declaration in a function type

This fixes the following assertion:

EA-37795 - assert: DescriptorResolver.checkBounds

java.lang.AssertionError: (
        public val categoryName: String,
        public val defaultReoccurrenceRate: DateReoccurrence,
        datesCollection: Collection<Date>) {

	at org.jetbrains.jet.lang.resolve.DescriptorResolver.checkBounds(DescriptorResolver.java:1137)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.checkTypesInClassHeaders(TypeHierarchyResolver.java:447)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.process(TypeHierarchyResolver.java:154)
	at org.jetbrains.jet.lang.resolve.TopDownAnalyzer.doProcess(TopDownAnalyzer.java:125)

Caused by misbehavior of the JetFunctionType class
This commit is contained in:
Andrey Breslav
2012-11-06 15:29:14 +04:00
parent 4cda4ce388
commit 6feceaa161
11 changed files with 309 additions and 270 deletions
@@ -75,6 +75,7 @@ public interface JetNodeTypes {
@Deprecated // Tuples are to be removed in Kotlin M4
JetNodeType TUPLE_TYPE = new JetNodeType("TUPLE_TYPE", JetTupleType.class);
JetNodeType FUNCTION_TYPE = new JetNodeType("FUNCTION_TYPE", JetFunctionType.class);
JetNodeType FUNCTION_TYPE_RECEIVER = new JetNodeType("FUNCTION_TYPE_RECEIVER", JetFunctionTypeReceiver.class);
JetNodeType SELF_TYPE = new JetNodeType("SELF_TYPE", JetSelfType.class);
JetNodeType NULLABLE_TYPE = new JetNodeType("NULLABLE_TYPE", JetNullableType.class);
JetNodeType TYPE_PROJECTION = new JetNodeType("TYPE_PROJECTION", JetTypeProjection.class);
@@ -1428,8 +1428,10 @@ public class JetParsing extends AbstractJetParsing {
// A.(B) -> C
// ^
PsiBuilder.Marker precede = typeRefMarker.precede();
PsiBuilder.Marker functionType = typeRefMarker.precede();
PsiBuilder.Marker receiverType = typeRefMarker.precede();
typeRefMarker.done(TYPE_REFERENCE);
receiverType.done(FUNCTION_TYPE_RECEIVER);
advance(); // DOT
@@ -1439,9 +1441,9 @@ public class JetParsing extends AbstractJetParsing {
else {
error("Expecting function type");
}
typeRefMarker = precede.precede();
typeRefMarker = functionType.precede();
precede.done(FUNCTION_TYPE);
functionType.done(FUNCTION_TYPE);
}
// myBuilder.restoreJoiningComplexTokensState();
return typeRefMarker;
@@ -1607,7 +1609,7 @@ public class JetParsing extends AbstractJetParsing {
/*
* functionType
* : (type ".")? "(" (parameter | modifiers type){","}? ")" "->" type?
* : "(" (parameter | modifiers type){","}? ")" "->" type?
* ;
*/
private void parseFunctionType() {
@@ -18,8 +18,6 @@ package org.jetbrains.jet.lang.psi;
import com.google.common.collect.Lists;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.JetNodeTypes;
@@ -82,34 +80,15 @@ public class JetFunctionType extends JetTypeElement {
@Nullable
public JetTypeReference getReceiverTypeRef() {
PsiElement child = getFirstChild();
while (child != null) {
IElementType tt = child.getNode().getElementType();
if (tt == JetTokens.LPAR || tt == RETURN_TYPE_SEPARATOR) break;
if (child instanceof JetTypeReference) {
return (JetTypeReference) child;
}
child = child.getNextSibling();
JetFunctionTypeReceiver receiverDeclaration = (JetFunctionTypeReceiver) findChildByType(JetNodeTypes.FUNCTION_TYPE_RECEIVER);
if (receiverDeclaration == null) {
return null;
}
return null;
return receiverDeclaration.getTypeReference();
}
@Nullable
public JetTypeReference getReturnTypeRef() {
boolean colonPassed = false;
PsiElement child = getFirstChild();
while (child != null) {
IElementType tt = child.getNode().getElementType();
if (tt == RETURN_TYPE_SEPARATOR) {
colonPassed = true;
}
if (colonPassed && child instanceof JetTypeReference) {
return (JetTypeReference) child;
}
child = child.getNextSibling();
}
return null;
return (JetTypeReference) findChildByType(JetNodeTypes.TYPE_REFERENCE);
}
}
@@ -0,0 +1,32 @@
/*
* Copyright 2010-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.lang.psi;
import com.intellij.lang.ASTNode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.JetNodeTypes;
public class JetFunctionTypeReceiver extends JetElementImpl {
public JetFunctionTypeReceiver(@NotNull ASTNode node) {
super(node);
}
@NotNull
public JetTypeReference getTypeReference() {
return (JetTypeReference) findChildByType(JetNodeTypes.TYPE_REFERENCE);
}
}
@@ -0,0 +1 @@
class <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>A<!> : (categoryName: <!SYNTAX!><!>) <!SYNTAX!>{<!SYNTAX!><!><!>
+144 -138
View File
@@ -459,42 +459,11 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
TYPE_REFERENCE
TUPLE_TYPE
PsiElement(HASH)('#')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
<empty list>
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -519,9 +488,61 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
TYPE_REFERENCE
TUPLE_TYPE
PsiElement(HASH)('#')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
<empty list>
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(GT)('>')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
TYPE_ARGUMENT_LIST
@@ -530,26 +551,8 @@ JetFile: FunctionTypes.jet
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(IDENTIFIER)('x')
PsiElement(GT)('>')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('x')
PsiElement(GT)('>')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -574,62 +577,21 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
TYPE_REFERENCE
TUPLE_TYPE
PsiElement(HASH)('#')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
<empty list>
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
USER_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -654,19 +616,81 @@ JetFile: FunctionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
USER_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
TYPE_REFERENCE
TUPLE_TYPE
PsiElement(HASH)('#')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
TYPEDEF
PsiElement(type)('type')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
<empty list>
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(GT)('>')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
TYPE_ARGUMENT_LIST
@@ -675,26 +699,8 @@ JetFile: FunctionTypes.jet
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(IDENTIFIER)('x')
PsiElement(GT)('>')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('x')
PsiElement(GT)('>')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
+5 -4
View File
@@ -111,10 +111,11 @@ JetFile: LocalDeclarations.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
+5 -4
View File
@@ -400,10 +400,11 @@ JetFile: Builder.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Library')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Library')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
+5 -4
View File
@@ -41,10 +41,11 @@ JetFile: With.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -360,10 +360,11 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -393,14 +394,15 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(IDENTIFIER)('B')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -430,12 +432,13 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
@@ -466,14 +469,15 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
PsiElement(LPAR)('(')
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiElement(RPAR)(')')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
PsiElement(LPAR)('(')
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiElement(RPAR)(')')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -568,25 +572,26 @@ JetFile: functionTypes.jet
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)(')')
FUNCTION_TYPE_RECEIVER
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)('(')
@@ -887,10 +892,11 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -924,14 +930,15 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
USER_TYPE
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(IDENTIFIER)('B')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -965,12 +972,13 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
@@ -1005,14 +1013,15 @@ JetFile: functionTypes.jet
PsiWhiteSpace(' ')
TYPE_REFERENCE
FUNCTION_TYPE
TYPE_REFERENCE
PsiElement(LPAR)('(')
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiElement(RPAR)(')')
FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE
PsiElement(LPAR)('(')
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiElement(RPAR)(')')
PsiElement(DOT)('.')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
@@ -1123,29 +1132,30 @@ JetFile: functionTypes.jet
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)(')')
FUNCTION_TYPE_RECEIVER
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)('(')
@@ -1656,6 +1656,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funKeyword.kt");
}
@TestMetadata("funcitonTypes.kt")
public void testFuncitonTypes() throws Exception {
doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funcitonTypes.kt");
}
@TestMetadata("incompleteVal.kt")
public void testIncompleteVal() throws Exception {
doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteVal.kt");