Add constructor parameter for compileTimeConstant (can be used in annotation)

This commit is contained in:
Natalia Ukhorskaya
2014-01-23 15:40:11 +04:00
parent fd3f852a93
commit 3f429116e5
37 changed files with 276 additions and 175 deletions
@@ -0,0 +1,14 @@
// FILE: Test.java
public class Test {
public static int i1 = Integer.MAX_VALUE;
public static final int i2 = Integer.MAX_VALUE;
public final int i3 = Integer.MAX_VALUE;
public int i4 = Integer.MAX_VALUE;
}
// FILE: A.kt
val a1: Int = Test.i1 + 1
val a2: Int = <!INTEGER_OVERFLOW!>Test.i2 + 1<!>
val a3: Int = <!INTEGER_OVERFLOW!>Test().i3 + 1<!>
val a4: Int = Test().i4 + 1