-
Notifications
You must be signed in to change notification settings - Fork 291
/
Copy pathconstProperties.kt
57 lines (54 loc) · 1.77 KB
/
constProperties.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// WITH_RUNTIME
// TEST PROCESSOR: ConstPropertiesProcessor
// EXPECTED:
// insideCompanionConstCompiled
// insideCompanionConstSource
// insideObjectConstCompiled
// insideObjectConstSource
// topLevelConstCompiled
// topLevelConstSource
// END
// MODULE: lib
// FILE: compiledProperties.kt
package foo.compiled
const val topLevelConstCompiled: String = "hello"
val topLevelCompiled: String = "hello"
val topLevelDelegatedCompiled by lazy { "hello" }
var topLevelVarCompiled: String = "hello"
val topLevelCustomGetterCompiled: String get() = "hello"
object TestObject {
const val insideObjectConstCompiled: Boolean = true
val insideObjectCompiled: String = "hello"
val insideObjectDelegatedCompiled by lazy { "hello" }
var insideVarObjectCompiled: String = "hello"
val insideObjectCustomGetterCompiled: String get() = "hello"
}
interface Foo {
val abstractCompiled: Long
val abstractWithDefaultCompiled: Long get() = 100L
companion object {
const val insideCompanionConstCompiled: Int = 34
}
}
// MODULE: main(lib)
// FILE: sourceProperties.kt
package foo.source
const val topLevelConstSource: String = "hello"
val topLevelSource: String = "hello"
val topLevelDelegatedSource by lazy { "hello" }
var topLevelVarSource: String = "hello"
val topLevelCustomGetterSource: String get() = "hello"
object TestObject {
const val insideObjectConstSource: Boolean = true
val insideObjectSource: String = "hello"
val insideObjectDelegatedSource by lazy { "hello" }
var insideVarObjectSource: String = "hello"
val insideObjectCustomGetterSource: String get() = "hello"
}
interface Foo {
val abstractSource: Long
val abstractWithDefaultSource: Long get() = 100L
companion object {
const val insideCompanionConstSource: Int = 34
}
}