Files
kotlin/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valNoName.kt
Denis Zharkov 46f11a5ec4 Add val/var tokens in parameter name recovery set
Recovery after val/var everywhere beside value parameters works
properly without this change

 #KT-7915 Fixed
2016-07-08 16:06:47 +03:00

44 lines
585 B
Kotlin
Vendored

// VAL
class A(
val<!SYNTAX!><!>
val x: Int,
val
private<!SYNTAX!><!> val z: Int,
val<!SYNTAX!><!>
)
val<!SYNTAX!><!>
fun foo() {}
class B {
val<!SYNTAX!><!>
fun foo() {}
fun bar() {
val<!SYNTAX!><!>
fun foo() {}
}
}
// VAR
class C(
var<!SYNTAX!><!>
val x: Int,
var
private<!SYNTAX!><!> val z: Int,
var<!SYNTAX!><!>
)
var<!SYNTAX!><!>
fun baz() {}
class D {
var<!SYNTAX!><!>
fun foo() {}
fun bar() {
var<!SYNTAX!><!>
fun foo() {}
}
}