Add recovery for properties without name

If property name is parsed on the next line and declaration is invalid
(no receiver/type/initializer), treat that name as it does not belong to property

 #KT-12987 In Progress
This commit is contained in:
Denis Zharkov
2016-07-07 16:26:30 +03:00
parent 141db1809f
commit f1026935a0
12 changed files with 457 additions and 3 deletions
+41
View File
@@ -0,0 +1,41 @@
fun foo() {
val
println("abc")
val
lambdaCall {
}
val
if (1 == 1) {
}
val
(1 + 2)
// `propertyNameOnTheNextLine` parsed as simple name expression
val
propertyNameOnTheNextLine
val
// comment
propertyNameOnTheNextLine
val /* comment */
propertyNameOnTheNextLine
// Correct properties
val
property1 = 1
val
propertyWithBy by lazy { 1 }
val
propertyWithType: Int
val
(a, b) = 1
}