Files
kotlin-fork/compiler/testData/diagnostics/tests/incompleteCode/kt2014.kt
T
Dmitriy Novozhilov e6b5cb5216 [TD] Update diagnostics test data due to new test runners
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00

21 lines
411 B
Kotlin
Vendored

//KT-2014 Better diagnostic when using property syntax to call a method
package c
class Foo {
fun prop() : Int = 1
fun bar(i: Int) : Int = i
val a : Int = 1
}
fun x(f : Foo) {
f.<!FUNCTION_CALL_EXPECTED!>prop<!>
f.<!FUNCTION_CALL_EXPECTED, NO_VALUE_FOR_PARAMETER!>bar<!>
f.<!FUNCTION_EXPECTED!>a<!>()
<!UNRESOLVED_REFERENCE!>c<!>()
<!FUNCTION_EXPECTED!>R<!>()
}
object R {}