Files
kotlin-fork/compiler/testData/diagnostics/tests/numbers/kt47729_parenthesis.kt
T
Dmitriy Novozhilov 52b72a7dac [FIR] Implement Int -> Long conversions for literals and operators over them
^KT-38895
^KT-50996 Fixed
^KT-51000 Fixed
^KT-51003 Fixed
^KT-51018 Fixed
2022-02-07 13:36:36 +03:00

22 lines
429 B
Kotlin
Vendored

// FIR_IDENTICAL
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// ISSUE: Kt-47447, KT-47729
fun takeLong(x: Long) {}
object Foo {
var longProperty: Long = 0
infix fun infixOperator(x: Long) {}
}
// Should be ok in all places
fun test() {
takeLong(1 + 1)
takeLong((1 + 1))
Foo.longProperty = 1 + 1
Foo.longProperty = (1 + 1)
Foo infixOperator 1 + 1
Foo infixOperator (1 + 1)
}