mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
Resource declaration conflicts highlighting
This commit is contained in:
+11
-3
@@ -34,7 +34,7 @@ class C {
|
||||
try (<error descr="Incompatible types. Found: 'java.lang.String', required: 'java.lang.AutoCloseable'">"resource"</error>) { }
|
||||
}
|
||||
|
||||
void m3() throws Exception {
|
||||
void m3(int p) throws Exception {
|
||||
try (MyResource r = new MyResource()) {
|
||||
r.doSomething();
|
||||
/* todo: < error descr="Cannot assign a value to final variable 'r'">r = null</error >;*/
|
||||
@@ -47,10 +47,18 @@ class C {
|
||||
}
|
||||
<error descr="Cannot resolve symbol 'r'">r</error> = null;
|
||||
|
||||
try (MyResource <error descr="Variable 'r' is already defined in the scope">r</error> = new MyResource(); MyResource <error descr="Variable 'r' is already defined in the scope">r</error> = new MyResource()) { }
|
||||
|
||||
MyResource r = null;
|
||||
|
||||
try (MyResource <error descr="Variable 'r' is already defined in the scope">r</error> = new MyResource()) { }
|
||||
|
||||
try (r = new MyResource()) { }
|
||||
|
||||
try (MyResource <error descr="Variable 'p' is already defined in the scope">p</error> = new MyResource()) { }
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
try (MyResource p = new MyResource()) { }
|
||||
catch (E e) { }
|
||||
}
|
||||
}.run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user