Generate generic signature to collection method stubs
#KT-6213 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
public class Test {
|
||||
public static void checkCallFromJava() {
|
||||
try {
|
||||
String x = _DefaultPackage.foo().iterator().next();
|
||||
throw new AssertionError("E should have been thrown");
|
||||
} catch (E e) { }
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait MyIterable<T> : Iterable<T>
|
||||
|
||||
class E : RuntimeException()
|
||||
fun foo(): MyIterable<String> = throw E()
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
foo().iterator().next()
|
||||
return "Fail: E should have been thrown"
|
||||
} catch (e: E) {}
|
||||
|
||||
Test.checkCallFromJava()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user