Do not generate Throws attribute for delegated members from Kotlin interfaces

#KT-31763 Fixed
 #KT-35834
This commit is contained in:
Alexander Udalov
2020-01-08 17:59:37 +01:00
parent 79d7335b8d
commit 621936e951
19 changed files with 294 additions and 18 deletions

View File

@@ -0,0 +1,21 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: A.java
import java.io.IOException;
public interface A {
void foo() throws IOException;
}
// FILE: B.kt
class B(a: A) : A by a
fun box(): String {
val method = B::class.java.declaredMethods.single { it.name == B::foo.name }
if (method.exceptionTypes.size != 0)
return "Fail: ${method.exceptionTypes.toList()}"
return "OK"
}