KT-8275 Unterminated multi-line comment should be compilation error
#KT-8275 fixed
This commit is contained in:
committed by
Andrey Breslav
parent
7cad65a1e7
commit
0d79c65d73
@@ -3,4 +3,6 @@ JetFile: BlockCommentAtBeginningOfFile1.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiComment(BLOCK_COMMENT)('/*')
|
||||
PsiComment(BLOCK_COMMENT)('/*')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -3,4 +3,6 @@ JetFile: BlockCommentAtBeginningOfFile2.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiComment(BLOCK_COMMENT)('/*\n/*')
|
||||
PsiComment(BLOCK_COMMENT)('/*\n/*')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -3,4 +3,6 @@ JetFile: BlockCommentAtBeginningOfFile3.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiComment(BLOCK_COMMENT)('/*\n\nfooo')
|
||||
PsiComment(BLOCK_COMMENT)('/*\n\nfooo')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -3,4 +3,6 @@ JetFile: BlockCommentAtBeginningOfFile4.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiComment(BLOCK_COMMENT)('/*\n\n/*foo*/\n\nasdfas')
|
||||
PsiComment(BLOCK_COMMENT)('/*\n\n/*foo*/\n\nasdfas')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -0,0 +1,3 @@
|
||||
fun f() {
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
JetFile: BlockCommentUnmatchedClosing_ERR.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(MUL)('*')
|
||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||
PsiElement(DIV)('/')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -7,3 +7,5 @@ JetFile: DocCommentAtBeginningOfFile1.kt
|
||||
PsiElement(KDOC_START)('/**')
|
||||
KDOC_SECTION
|
||||
<empty list>
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -8,3 +8,5 @@ JetFile: DocCommentAtBeginningOfFile2.kt
|
||||
PsiWhiteSpace('\n')
|
||||
KDOC_SECTION
|
||||
PsiElement(KDOC_TEXT)('/**')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -8,3 +8,5 @@ JetFile: DocCommentAtBeginningOfFile3.kt
|
||||
PsiWhiteSpace('\n\n')
|
||||
KDOC_SECTION
|
||||
PsiElement(KDOC_TEXT)('fooo')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
@@ -10,3 +10,5 @@ JetFile: DocCommentAtBeginningOfFile4.kt
|
||||
PsiElement(KDOC_TEXT)('/**foo*/')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PsiElement(KDOC_TEXT)('asdfas')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
+2
@@ -8,3 +8,5 @@ JetFile: Incomplete.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
KDOC_SECTION
|
||||
PsiElement(KDOC_TEXT)('contents')
|
||||
PsiErrorElement:Unclosed comment
|
||||
<empty list>
|
||||
Reference in New Issue
Block a user