Use type from compile time value for binary expression
This commit is contained in:
@@ -9,10 +9,10 @@ annotation class BooleanAnno(val value: Boolean)
|
||||
annotation class FloatAnno(val value: Float)
|
||||
annotation class DoubleAnno(val value: Double)
|
||||
|
||||
IntAnno(42)
|
||||
ShortAnno(42)
|
||||
ByteAnno(42)
|
||||
LongAnno(42)
|
||||
IntAnno(42.toInt())
|
||||
ShortAnno(42.toShort())
|
||||
ByteAnno(42.toByte())
|
||||
LongAnno(42.toLong())
|
||||
CharAnno('A')
|
||||
BooleanAnno(false)
|
||||
FloatAnno(3.14.toFloat())
|
||||
|
||||
@@ -18,7 +18,7 @@ internal final annotation class CharAnno : jet.Annotation {
|
||||
internal final fun <get-value>(): jet.Char
|
||||
}
|
||||
|
||||
test.IntAnno(value = IntegerValueType(42): IntegerValueType(42)) test.ShortAnno(value = IntegerValueType(42): IntegerValueType(42)) test.ByteAnno(value = IntegerValueType(42): IntegerValueType(42)) test.LongAnno(value = IntegerValueType(42): IntegerValueType(42)) test.CharAnno(value = #65(A): jet.Char) test.BooleanAnno(value = false: jet.Boolean) test.FloatAnno(value = 3.14.toFloat(): jet.Float) test.DoubleAnno(value = 3.14.toDouble(): jet.Double) internal final class Class {
|
||||
test.IntAnno(value = 42.toInt(): jet.Int) test.ShortAnno(value = 42.toShort(): jet.Short) test.ByteAnno(value = 42.toByte(): jet.Byte) test.LongAnno(value = 42.toLong(): jet.Long) test.CharAnno(value = #65(A): jet.Char) test.BooleanAnno(value = false: jet.Boolean) test.FloatAnno(value = 3.14.toFloat(): jet.Float) test.DoubleAnno(value = 3.14.toDouble(): jet.Double) internal final class Class {
|
||||
/*primary*/ public constructor Class()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@ package test
|
||||
|
||||
annotation class Anno(val int: Int, val string: String, val double: Double)
|
||||
|
||||
Anno(42, "OK", 3.14) class Class
|
||||
Anno(42.toInt(), "OK", 3.14.toDouble()) class Class
|
||||
|
||||
@@ -10,6 +10,6 @@ internal final annotation class Anno : jet.Annotation {
|
||||
internal final fun <get-string>(): jet.String
|
||||
}
|
||||
|
||||
test.Anno(double = 3.14.toDouble(): jet.Double, int = IntegerValueType(42): IntegerValueType(42), string = "OK": jet.String) internal final class Class {
|
||||
test.Anno(double = 3.14.toDouble(): jet.Double, int = 42.toInt(): jet.Int, string = "OK": jet.String) internal final class Class {
|
||||
/*primary*/ public constructor Class()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user