Files
kotlin-fork/compiler/testData/psi/CommentsBinding.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

74 lines
1.4 KiB
Kotlin

/*
* Copyright JetBrains s.r.o.
*/
package foo.bar // package directive
import java.util.* // we need classes from java.util
import javax.* // and from here too
// other imports
import a.b
import c.d
/**
* Doc comment for A
*/
class A {}
// after class A
// comment for B 1
// comment for B 2
class B {} // end of class B
/* Simple comment */
class C // no body
class D {
// This is v1
val v1 = 1 // use 1
/** v2 doc comment */
val v2 = 2
// Function foo()
fun foo(/* parameters */ p1: Int/* p1 */, p2: Int /* p2 */, p3: String = a.b(c)/*parameter with default value*/) {
// before local var
val local = 1 // local var
// before local fun
fun localFun() = 1 // local fun
// before local class
class Local{} // local class
// before statement
foo() // statement
} // end of foo
// default object
default object {
} // end of default object
}
// This is v
val v = 1 // one
// This is fun
public fun foo() {
val local = 1 // this is local
// declare another local
val local2 = 2
} // end
enum class E {
A // this is A
/** This is B */ B
/* And this is C */ C
/** This is X */
X {
override fun toString() = "X"
} // end of X
}
var prop: Int // Int
get() = 1 // this is getter
set(value) {} // this is setter
val prop2: Int get = 1 // prop2