[FIR] Prioritize double over float in overload resolution
#KT-57194 Fixed
This commit is contained in:
committed by
Space Team
parent
525317962c
commit
fa432d7f0d
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user