Added test for annotations on nullable types
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
fun foo(i: @a Int?) {}
|
||||||
|
|
||||||
|
fun @a Int?.bar() {}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
JetFile: annotationsOnNullableTypes.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
IMPORT_LIST
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_PARAMETER
|
||||||
|
PsiElement(IDENTIFIER)('i')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
NULLABLE_TYPE
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
PsiElement(AT)('@')
|
||||||
|
CONSTRUCTOR_CALLEE
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Int')
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
NULLABLE_TYPE
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
PsiElement(AT)('@')
|
||||||
|
CONSTRUCTOR_CALLEE
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Int')
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -771,6 +771,12 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
|||||||
doParsingTest(fileName);
|
doParsingTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotationsOnNullableTypes.kt")
|
||||||
|
public void testAnnotationsOnNullableTypes() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/annotationsOnNullableTypes.kt");
|
||||||
|
doParsingTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("AnnotationsOnPatterns.kt")
|
@TestMetadata("AnnotationsOnPatterns.kt")
|
||||||
public void testAnnotationsOnPatterns() throws Exception {
|
public void testAnnotationsOnPatterns() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/AnnotationsOnPatterns.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/AnnotationsOnPatterns.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user