Do not parse !! as part of annotation type
^KT-26245 Related
This commit is contained in:
committed by
TeamCityServer
parent
37f923a98f
commit
16ca8ddbbd
@@ -3,3 +3,7 @@ fun <T> foo1(x: T!!, y: List<T!!>, z: T!!.(T!!) -> T!!): T!! {}
|
||||
|
||||
// should be prohibited on type-resolution level
|
||||
fun <T> foo2(x: T!!?, y: List<T!!?>, z: T!!?.(T!!?) -> T!!?, w: String!!): T!! {}
|
||||
|
||||
fun foo3() {
|
||||
if (@RetentionSourceAndTargetExpression !!(x == y)) {}
|
||||
}
|
||||
|
||||
+53
-1
@@ -207,4 +207,56 @@ KtFile: DefinitelyNotNullType.kt
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo3')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
IF
|
||||
PsiElement(if)('if')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
CONDITION
|
||||
ANNOTATED_EXPRESSION
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('RetentionSourceAndTargetExpression')
|
||||
PsiWhiteSpace(' ')
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EXCL)('!')
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EXCL)('!')
|
||||
PARENTHESIZED
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('y')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
THEN
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
|
||||
Reference in New Issue
Block a user