KT-337 Can't break a line before a dot

This commit is contained in:
Nikolay Krasko
2011-11-28 12:59:16 +04:00
parent 5ad627fab9
commit 09de9bef20
6 changed files with 90 additions and 4 deletions
@@ -0,0 +1,11 @@
fun test() {
val str = ""
str
.length
str
?.length
}
@@ -0,0 +1,41 @@
JetFile: NewLinesValidOperations.jet
NAMESPACE
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('test')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('str')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
STRING_TEMPLATE
PsiElement(OPEN_QUOTE)('"')
PsiElement(CLOSING_QUOTE)('"')
PsiWhiteSpace('\n\n ')
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('str')
PsiWhiteSpace('\n\n ')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('length')
PsiWhiteSpace('\n\n ')
SAFE_ACCESS_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('str')
PsiWhiteSpace('\n\n ')
PsiElement(SAFE_ACCESS)('?.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('length')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')