Files
kotlin-fork/compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.fir.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

17 lines
529 B
Kotlin
Vendored

package a
fun foo(i: Int) = i
fun bar(l: Long) = l
fun main() {
val i = <!INT_LITERAL_OUT_OF_RANGE!>111111111111111777777777777777<!>
//todo add diagnostic text messages
//report only 'The value is out of range'
//not 'An integer literal does not conform to the expected type Int/Long'
val l: Long = <!INT_LITERAL_OUT_OF_RANGE!>1111111111111117777777777777777<!>
foo(<!INT_LITERAL_OUT_OF_RANGE!>11111111111111177777777777777<!>)
bar(<!INT_LITERAL_OUT_OF_RANGE!>11111111111111177777777777777<!>)
}