mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
introduce constant: check forward reference fix ( IDEA-84139)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
public class Res {
|
||||
|
||||
void bar(R r){}
|
||||
|
||||
interface R<S, T> {
|
||||
void la(S s, T t);
|
||||
}
|
||||
|
||||
private void validateStructuresCookie(Res cookie) {
|
||||
cookie.bar(new <caret>R<String, Object>(){
|
||||
final String param = "";
|
||||
@Override
|
||||
public void la(String s, Object o) {
|
||||
System.out.println(param);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
public class Res {
|
||||
|
||||
public static final Res.R<String,Object> R = new Res.R<String, Object>() {
|
||||
final String param = "";
|
||||
|
||||
@Override
|
||||
public void la(String s, Object o) {
|
||||
System.out.println(param);
|
||||
}
|
||||
};
|
||||
|
||||
void bar(R r){}
|
||||
|
||||
interface R<S, T> {
|
||||
void la(S s, T t);
|
||||
}
|
||||
|
||||
private void validateStructuresCookie(Res cookie) {
|
||||
cookie.bar(<caret>R);
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,15 @@ public class InplaceIntroduceConstantTest extends AbstractJavaInplaceIntroduceTe
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void testCorrectConstantPosition() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
|
||||
type("R");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void testEscapePosition() throws Exception {
|
||||
doTestEscape();
|
||||
|
||||
Reference in New Issue
Block a user