Supported inlining constant properties.

This commit is contained in:
Evgeny Gerashchenko
2013-07-24 14:15:11 +04:00
parent b721b0211a
commit a13092e525
17 changed files with 205 additions and 40 deletions
@@ -0,0 +1,5 @@
val C = 239
fun f() {
println(<caret>C)
}
@@ -0,0 +1,3 @@
fun f() {
println(239)
}
@@ -0,0 +1,9 @@
class Class {
class object {
val p = 239
}
}
fun f() {
println(Class.<caret>p)
}
@@ -0,0 +1,8 @@
class Class {
class object {
}
}
fun f() {
println(239)
}
@@ -0,0 +1,7 @@
val Int.C = 239
// not implemented yet
fun f() {
println(5.<caret>C)
}
@@ -0,0 +1,11 @@
class Class {
val p = 239
fun f() {
println(p)
}
}
fun f() {
println(Class().<caret>p)
}
@@ -0,0 +1,10 @@
class Class {
fun f() {
println(239)
}
}
fun f() {
println(239)
}
@@ -0,0 +1,7 @@
object Obj {
val p = 239
}
fun f() {
println(Obj.<caret>p)
}
@@ -0,0 +1,6 @@
object Obj {
}
fun f() {
println(239)
}
@@ -0,0 +1,7 @@
package foo.bar
val C = 239
fun f() {
println(foo.bar.<caret>C)
}
@@ -0,0 +1,5 @@
package foo.bar
fun f() {
println(239)
}
@@ -0,0 +1,8 @@
val C: Int
get() = 239
// not implemented yet
fun f() {
println(<caret>C)
}
@@ -0,0 +1,9 @@
val C = 239
get() = $C + 1
// not implemented yet
fun f() {
println(<caret>C)
}