[FIR] Use proper directOverriddenFunctions fun in FirNativeThrowsChecker

Fix false positive `INCOMPATIBLE_THROWS_OVERRIDE`

^KT-65105 Fixed

Merge-request: KT-MR-14937
Merged-by: Ivan Kochurkin <Ivan.Kochurkin@jetbrains.com>
This commit is contained in:
Ivan Kochurkin
2024-03-14 10:37:08 +00:00
committed by Space Team
parent 4941094521
commit b24d5390a8
4 changed files with 41 additions and 5 deletions
+12
View File
@@ -1,3 +1,5 @@
// ISSUE: KT-65105
// FILE: kotlin.kt
package kotlin
@@ -376,3 +378,13 @@ typealias ThrowableAlias = Throwable
@Throws(ThrowableAlias::class)
suspend fun suspendThrowsThrowableTypealias() {}
interface Foo<T> {
@Throws(IllegalArgumentException::class)
public fun f(data: T) {}
}
class Bar<K> : Foo<K> {
@Throws(IllegalArgumentException::class)
override fun f(data: K) {}
}