Quick Fixes: Add test for KT-5922 (QuickFix to change lambda signature doesn't work with SAM conversion)

This commit is contained in:
Alexey Sedunov
2014-12-09 12:23:57 +03:00
parent 14b33f8b95
commit 346d9ea0c5
4 changed files with 37 additions and 1 deletions
@@ -0,0 +1,6 @@
// "Change the signature of function literal" "true"
// DISABLE-ERRORS
fun main(args: Array<String>) {
Test<String>().perform("") {(s: String?, s1: String?) -> }
}
@@ -0,0 +1,6 @@
// "Change the signature of function literal" "true"
// DISABLE-ERRORS
fun main(args: Array<String>) {
Test<String>().perform("") <caret>{ }
}
@@ -0,0 +1,9 @@
class Test<T> {
public static interface Action<T> {
void call(T t, String name);
}
void perform(T t, Action<T> subscribe) {
subscribe.call(t, "");
}
}