Files
kotlin/compiler/testData/codegen/bytecodeText/redundantInitializerNumber.kt
Dmitry Jemerov 6442b61db8 Don't generate redundant initializers for 'var' properties.
Since only 'val' properties store initializers as compile time constants in descriptors, we need to take the initializer expression from the PSI and try to evaluate it as a constant.

 #KT-6661 fixed
2015-01-30 14:05:25 +01:00

8 lines
65 B
Kotlin
Vendored

package a
class A {
private var x: Int = 0
}
// 0 PUTFIELD