Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/parameters/expressions/maxValueByte.kt
T
Dmitriy Novozhilov 3cffb33ab7 [FE] Drop ApproximateIntegerLiteralTypesInReceiverPosition language feature
This feature is not needed because it is unconditionally disabled for K1
  (because of not fully correct implementation) and unconditionally enabled
  in K2 (K2 does not support old behavior)

^KT-38895
2022-12-09 15:10:02 +00:00

20 lines
484 B
Kotlin
Vendored

package test
annotation class Ann(
val p1: Byte,
val p2: Byte,
val p3: Int,
val p4: Int,
val p5: Byte
)
@Ann(
p1 = <!TYPE_MISMATCH!>java.lang.Byte.MAX_VALUE + 1<!>,
p2 = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 1<!>,
p3 = java.lang.Byte.MAX_VALUE + 1,
p4 = 1.toByte() + 1.toByte(),
p5 = <!TYPE_MISMATCH!>1.toByte() + 1.toByte()<!>
) class MyClass
// EXPECTED: @Ann(p1 = 128, p2 = 2.toByte(), p3 = 128, p4 = 2, p5 = 2)