Make NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION error
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package constants
|
||||
|
||||
public val b: Byte = 100
|
||||
public val s: Short = 20000
|
||||
public val i: Int = 2000000
|
||||
public val l: Long = 2000000000000L
|
||||
public val f: Float = 3.14f
|
||||
public val d: Double = 3.14
|
||||
public val bb: Boolean = true
|
||||
public val c: Char = '\u03c0' // pi symbol
|
||||
public const val b: Byte = 100
|
||||
public const val s: Short = 20000
|
||||
public const val i: Int = 2000000
|
||||
public const val l: Long = 2000000000000L
|
||||
public const val f: Float = 3.14f
|
||||
public const val d: Double = 3.14
|
||||
public const val bb: Boolean = true
|
||||
public const val c: Char = '\u03c0' // pi symbol
|
||||
|
||||
public val str: String = ":)"
|
||||
public const val str: String = ":)"
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
public annotation class AnnotationClass(public val value: String)
|
||||
public annotation class AnnotationClass(public val value: String)
|
||||
|
||||
+18
-18
@@ -1,21 +1,21 @@
|
||||
package a
|
||||
|
||||
val i = 2
|
||||
val s = 2.toShort()
|
||||
val f = 2.0.toFloat()
|
||||
val d = 2.0
|
||||
val l = 2L
|
||||
val b = 2.toByte()
|
||||
val bool = true
|
||||
val c = 'c'
|
||||
val str = "str"
|
||||
const val i = 2
|
||||
const val s = 2.toShort()
|
||||
const val f = 2.0.toFloat()
|
||||
const val d = 2.0
|
||||
const val l = 2L
|
||||
const val b = 2.toByte()
|
||||
const val bool = true
|
||||
const val c = 'c'
|
||||
const val str = "str"
|
||||
|
||||
val i2 = i
|
||||
val s2 = s
|
||||
val f2 = f
|
||||
val d2 = d
|
||||
val l2 = l
|
||||
val b2 = b
|
||||
val bool2 = bool
|
||||
val c2 = c
|
||||
val str2 = str
|
||||
const val i2 = i
|
||||
const val s2 = s
|
||||
const val f2 = f
|
||||
const val d2 = d
|
||||
const val l2 = l
|
||||
const val b2 = b
|
||||
const val bool2 = bool
|
||||
const val c2 = c
|
||||
const val str2 = str
|
||||
|
||||
Reference in New Issue
Block a user