Allow only 'out' modifier for value parameter modifiers in functional type
(comments also mention 'lazy' and 'ref'; these value parameter modifiers are unsupported, anyway).
This commit is contained in:
committed by
Stanislav Erokhin
parent
eec96f1954
commit
a3338b2230
+1
@@ -14,6 +14,7 @@ val p11: suspend @a a
|
||||
val p12: @a suspend a
|
||||
val p13: @a suspend @a a
|
||||
val p14: @[a] suspend @[a] a
|
||||
val p15: suspend (suspend (() -> Unit)) -> Unit
|
||||
|
||||
@a fun @a a.f1() {}
|
||||
fun (@a a.(a) -> a).f2() {}
|
||||
|
||||
+40
@@ -479,6 +479,46 @@ JetFile: TypeModifiers.kt
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('p15')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
MODIFIER_LIST
|
||||
PsiElement(suspend)('suspend')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
TYPE_REFERENCE
|
||||
MODIFIER_LIST
|
||||
PsiElement(suspend)('suspend')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
|
||||
+3
-3
@@ -80,10 +80,10 @@ JetFile: TypeModifiers_ERR.kt
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
MODIFIER_LIST
|
||||
PsiElement(suspend)('suspend')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
MODIFIER_LIST
|
||||
PsiElement(suspend)('suspend')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Type expected
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting comma or ')'
|
||||
|
||||
Reference in New Issue
Block a user