[FIR] Prioritize double over float in overload resolution

#KT-57194 Fixed
This commit is contained in:
Kirill Rakhman
2023-03-08 15:34:03 +01:00
committed by Space Team
parent 525317962c
commit fa432d7f0d
6 changed files with 45 additions and 4 deletions
@@ -0,0 +1,20 @@
// FIR_IDENTICAL
// SKIP_TXT
// DIAGNOSTICS: -USELESS_IS_CHECK, -DEBUG_INFO_SMARTCAST
// ISSUE: KT-57194
fun foo(arg: Double) {}
fun foo(arg: Float) {}
fun Double.bar() {}
fun Float.bar() {}
fun test(arg: Any) {
::foo
if (arg is Double) {
if (arg is Float) {
foo(arg)
arg.bar()
}
}
}