Files
kotlin-fork/j2k/testData/fileOrElement/comments/comments2.kt
T
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00

28 lines
808 B
Kotlin

// ERROR: A 'return' expression required in a function with a block body ('{...}')
// ERROR: A 'return' expression required in a function with a block body ('{...}')
package foo
class A {
fun /* nothing to return */ foo(/* no parameters at all */) {
// let declare a variable
// with 2 comments before
val /*int*/ a /* it's a */ = 2 /* it's 2 */ + 1 /* it's 1 */ // variable a declared
} // end of foo
fun /* we return int*/ foo(/*int*/ p: Int/* parameter p */): Int {
/* body is empty */
}
private /*it's private*/ val field = 0
public /*it's public*/ fun foo(s: String): Char {
}
protected /*it's protected*/ fun foo(c: Char) {
}
default object {
public /*it's public*//*and static*//*and final*/ val C: Int = 1
}
}