lambda: inline lambda initialized vars

This commit is contained in:
anna
2012-07-24 17:51:53 +02:00
parent 806ea310af
commit 445fe5c251
4 changed files with 31 additions and 0 deletions
@@ -0,0 +1,11 @@
interface SAM<X> {
X m(int i, int j);
}
class Foo {
void test() {
SAM<Integer> c = (i, j)->i + j;
m(<caret>c);
}
void m(SAM<Integer> s) { }
}
@@ -0,0 +1,10 @@
interface SAM<X> {
X m(int i, int j);
}
class Foo {
void test() {
m((i, j)->i + j);
}
void m(SAM<Integer> s) { }
}
@@ -136,6 +136,10 @@ public class InlineLocalTest extends LightCodeInsightTestCase {
doTest(false, "Cannot perform refactoring.\n" +
"Variable 'x' is accessed for writing.");
}
public void testLambdaExpr() throws Exception {
doTest(true);
}
private void doTest(final boolean inlineDef, String conflictMessage) throws Exception {
try {