JET-183 Typechecker fails with enum constants
+ Tests for annotations
This commit is contained in:
@@ -55,7 +55,9 @@ public class TypeUtils {
|
|||||||
|
|
||||||
if (!canHaveSubtypes(typeChecker, type)) {
|
if (!canHaveSubtypes(typeChecker, type)) {
|
||||||
for (JetType other : types) {
|
for (JetType other : types) {
|
||||||
if (!type.equals(other) && !typeChecker.isSubtypeOf(type, other)) {
|
// It makes sense to check for subtyping of other <: type, despite that
|
||||||
|
// type is not supposed to be open, for there're enums
|
||||||
|
if (!type.equals(other) && !typeChecker.isSubtypeOf(type, other) && !typeChecker.isSubtypeOf(other, type)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
enum class ProtocolState {
|
||||||
|
WAITING {
|
||||||
|
override fun signal() = ProtocolState.TALKING
|
||||||
|
}
|
||||||
|
|
||||||
|
TALKING {
|
||||||
|
override fun signal() = ProtocolState.WAITING
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract fun signal() : ProtocolState
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val x: ProtocolState = ProtocolState.WAITING
|
||||||
|
x = x.signal()
|
||||||
|
if (x != ProtocolState.TALKING) return "fail 1"
|
||||||
|
x = x.signal()
|
||||||
|
if (x != ProtocolState.WAITING) return "fail 2"
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -49,78 +49,116 @@ JetFile: Imports_ERR.jet
|
|||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
MODIFIER_LIST
|
||||||
PsiElement(IDENTIFIER)('foo')
|
ANNOTATION_ENTRY
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
TYPE_REFERENCE
|
||||||
PsiElement(DOT)('.')
|
USER_TYPE
|
||||||
PsiWhiteSpace('\n')
|
USER_TYPE
|
||||||
IMPORT_DIRECTIVE
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(import)('import')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DOT_QUALIFIED_EXPRESSION
|
ANNOTATION_ENTRY
|
||||||
DOT_QUALIFIED_EXPRESSION
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('foo')
|
USER_TYPE
|
||||||
PsiElement(DOT)('.')
|
USER_TYPE
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
PsiWhiteSpace('\n')
|
REFERENCE_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(DOT)('.')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace('\n')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(DOT)('.')
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Type name expected
|
||||||
|
PsiElement(as)('as')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Type name expected
|
||||||
|
PsiElement(MUL)('*')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiErrorElement:Expecting namespace or top level declaration
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
MODIFIER_LIST
|
||||||
PsiElement(IDENTIFIER)('bar')
|
ANNOTATION_ENTRY
|
||||||
PsiWhiteSpace('\n')
|
TYPE_REFERENCE
|
||||||
IMPORT_DIRECTIVE
|
USER_TYPE
|
||||||
PsiElement(import)('import')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DOT_QUALIFIED_EXPRESSION
|
ANNOTATION_ENTRY
|
||||||
REFERENCE_EXPRESSION
|
TYPE_REFERENCE
|
||||||
PsiElement(IDENTIFIER)('foo')
|
USER_TYPE
|
||||||
PsiElement(DOT)('.')
|
USER_TYPE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('bar')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiElement(MUL)('*')
|
PsiElement(DOT)('.')
|
||||||
PsiWhiteSpace(' ')
|
REFERENCE_EXPRESSION
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(as)('as')
|
PsiElement(DOT)('.')
|
||||||
PsiWhiteSpace(' ')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiErrorElement:Type name expected
|
||||||
PsiWhiteSpace('\n')
|
PsiElement(MUL)('*')
|
||||||
IMPORT_DIRECTIVE
|
|
||||||
PsiElement(import)('import')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
PsiElement(MUL)('*')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
|
||||||
PsiElement(as)('as')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
PsiElement(IDENTIFIER)('import')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiErrorElement:Expecting namespace or top level declaration
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
IMPORT_DIRECTIVE
|
||||||
|
PsiElement(import)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(as)('as')
|
||||||
|
PsiErrorElement:Expecting identifier
|
||||||
|
<empty list>
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import foo. as bar
|
|||||||
|
|
||||||
namespace foof {
|
namespace foof {
|
||||||
import foo.bar.* as bar
|
import foo.bar.* as bar
|
||||||
import foo.bar.* as
|
|
||||||
|
|
||||||
import foo as ;
|
import foo as ;
|
||||||
import foo. ;
|
import foo. ;
|
||||||
import foo.bar. ;
|
import foo.bar. ;
|
||||||
|
|||||||
@@ -19,38 +19,52 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(IDENTIFIER)('import')
|
PsiElement(IDENTIFIER)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
IMPORT_DIRECTIVE
|
|
||||||
PsiElement(import)('import')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('import')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(as)('as')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
NAMESPACE
|
NAMESPACE
|
||||||
|
MODIFIER_LIST
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('import')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Type name expected
|
||||||
|
PsiElement(as)('as')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(namespace)('namespace')
|
PsiElement(namespace)('namespace')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
NAMESPACE_NAME
|
NAMESPACE_NAME
|
||||||
@@ -79,27 +93,13 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
PsiElement(import)('import')
|
PsiElement(import)('import')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DOT_QUALIFIED_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
PsiElement(MUL)('*')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Cannot rename a all imported items to one identifier
|
|
||||||
PsiElement(as)('as')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
PsiElement(IDENTIFIER)('import')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(as)('as')
|
PsiElement(as)('as')
|
||||||
PsiWhiteSpace(' ')
|
PsiErrorElement:Expecting identifier
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
<empty list>
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
IMPORT_DIRECTIVE
|
IMPORT_DIRECTIVE
|
||||||
@@ -252,10 +252,14 @@ JetFile: NamespaceBlock_ERR.jet
|
|||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('dsfgd')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
CLASS
|
CLASS
|
||||||
|
MODIFIER_LIST
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('dsfgd')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(class)('class')
|
PsiElement(class)('class')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('Bar')
|
PsiElement(IDENTIFIER)('Bar')
|
||||||
|
|||||||
@@ -130,10 +130,14 @@ JetFile: Properties_ERR.jet
|
|||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiErrorElement:Expecting namespace or top level declaration
|
||||||
PsiElement(EQ)('=')
|
PsiElement(EQ)('=')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
PROPERTY
|
PROPERTY
|
||||||
|
MODIFIER_LIST
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(val)('val')
|
PsiElement(val)('val')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
TYPE_REFERENCE
|
TYPE_REFERENCE
|
||||||
|
|||||||
@@ -34,164 +34,171 @@ JetFile: SimpleClassMembers_ERR.jet
|
|||||||
CLASS_BODY
|
CLASS_BODY
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiErrorElement:Expecting member declaration
|
MODIFIER_LIST
|
||||||
PsiElement(IDENTIFIER)('sdfsd')
|
ANNOTATION_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('sdfsd')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(RBRACE)('}')
|
PsiErrorElement:Expecting member declaration
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(RBRACE)('}')
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
PROPERTY
|
|
||||||
PsiElement(val)('val')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('x')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
PROPERTY
|
|
||||||
PsiElement(var)('var')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('f')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
TYPEDEF
|
|
||||||
PsiElement(type)('type')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
TYPE_PARAMETER_LIST
|
|
||||||
<empty list>
|
|
||||||
PsiElement(EQ)('=')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
TYPE_REFERENCE
|
|
||||||
PsiErrorElement:Type expected
|
|
||||||
<empty list>
|
|
||||||
PsiElement(SEMICOLON)(';')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
CONSTRUCTOR
|
|
||||||
PsiElement(this)('this')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(COLON)(':')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
INITIALIZER_LIST
|
|
||||||
THIS_CALL
|
|
||||||
THIS_CONSTRUCTOR_REFERENCE
|
|
||||||
PsiElement(this)('this')
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
DELEGATOR_SUPER_CALL
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
|
||||||
TYPE_ARGUMENT_LIST
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('T')
|
|
||||||
PsiErrorElement:Expecting a '>'
|
|
||||||
<empty list>
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
CONSTRUCTOR
|
|
||||||
PsiElement(this)('this')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(COLON)(':')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
INITIALIZER_LIST
|
|
||||||
THIS_CALL
|
|
||||||
THIS_CONSTRUCTOR_REFERENCE
|
|
||||||
PsiElement(this)('this')
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
DELEGATOR_SUPER_CALL
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
|
||||||
TYPE_ARGUMENT_LIST
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('T')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
VALUE_ARGUMENT
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
PsiElement(RBRACE)('}')
|
FUN
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(fun)('fun')
|
||||||
CONSTRUCTOR
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(this)('this')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
VALUE_PARAMETER_LIST
|
VALUE_PARAMETER_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(COLON)(':')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
INITIALIZER_LIST
|
|
||||||
PsiErrorElement:Expecting constructor call (this(...)) or supertype initializer
|
|
||||||
PsiElement(MINUS)('-')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PROPERTY
|
||||||
|
PsiElement(val)('val')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PROPERTY
|
||||||
|
PsiElement(var)('var')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('f')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
TYPEDEF
|
||||||
|
PsiElement(type)('type')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PARAMETER_LIST
|
||||||
|
<empty list>
|
||||||
|
PsiElement(EQ)('=')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CONSTRUCTOR
|
||||||
|
PsiElement(this)('this')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INITIALIZER_LIST
|
||||||
|
THIS_CALL
|
||||||
|
THIS_CONSTRUCTOR_REFERENCE
|
||||||
|
PsiElement(this)('this')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
DELEGATOR_SUPER_CALL
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('T')
|
||||||
|
PsiErrorElement:Expecting a '>'
|
||||||
|
<empty list>
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CONSTRUCTOR
|
||||||
|
PsiElement(this)('this')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INITIALIZER_LIST
|
||||||
|
THIS_CALL
|
||||||
|
THIS_CONSTRUCTOR_REFERENCE
|
||||||
|
PsiElement(this)('this')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
DELEGATOR_SUPER_CALL
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('T')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CONSTRUCTOR
|
||||||
|
PsiElement(this)('this')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INITIALIZER_LIST
|
||||||
|
PsiErrorElement:Expecting constructor call (this(...)) or supertype initializer
|
||||||
|
PsiElement(MINUS)('-')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiErrorElement:Missing '}
|
||||||
PsiElement(RBRACE)('}')
|
<empty list>
|
||||||
+18
-16
@@ -387,14 +387,15 @@ JetFile: When.jet
|
|||||||
PsiElement(when)('when')
|
PsiElement(when)('when')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(val)('val')
|
PROPERTY
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(val)('val')
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(EQ)('=')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(EQ)('=')
|
||||||
REFERENCE_EXPRESSION
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('e')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
@@ -1015,14 +1016,15 @@ JetFile: When.jet
|
|||||||
PsiElement(when)('when')
|
PsiElement(when)('when')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(val)('val')
|
PROPERTY
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(val)('val')
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(EQ)('=')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(EQ)('=')
|
||||||
REFERENCE_EXPRESSION
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('e')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
|
|||||||
Reference in New Issue
Block a user