mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: No deprecation warning when declaration and usage are within the same top-level class, JLS 9.6.4.6 (IDEA-131480)
This commit is contained in:
+11
-1
@@ -26,7 +26,7 @@ class b extends a {
|
||||
}
|
||||
|
||||
b() {
|
||||
<warning descr="'b(int)' is deprecated">this</warning>(1);
|
||||
this(1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,6 +39,10 @@ class b extends a {
|
||||
}
|
||||
|
||||
class c extends b {
|
||||
c(int i) {
|
||||
<warning descr="'b(int)' is deprecated">super</warning>(i);
|
||||
}
|
||||
|
||||
// b.f is not deprecated
|
||||
void f() {}
|
||||
}
|
||||
@@ -83,6 +87,12 @@ class Anonym {
|
||||
public Anonym(String sss) {
|
||||
System.out.println(sss);
|
||||
}
|
||||
public void foo() {
|
||||
new Anonym("asdasd") {};
|
||||
}
|
||||
}
|
||||
|
||||
class UseAnonym {
|
||||
public void foo() {
|
||||
new <warning descr="'Anonym(java.lang.String)' is deprecated">Anonym</warning>("asdasd") {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user