Debian Codegraph @

checker/tests/initialization/fbc/TypeFrames2.java

raw
1 import org.checkerframework.checker.initialization.qual.UnderInitialization;
2 import org.checkerframework.checker.nullness.qual.NonNull;
3
4 public class TypeFrames2 {
5
6 class A {
7 @NonNull String a;
8
9 public A() {
10 // :: error: (method.invocation.invalid)
11 this.foo();
12 a = "";
13 this.foo();
14 }
15
16 public void foo(@UnderInitialization(A.class) A this) {}
17 }
18
19 class B extends A {
20 @NonNull String b;
21
22 public B() {
23 super();
24 this.foo();
25 // :: error: (method.invocation.invalid)
26 this.bar();
27 b = "";
28 this.bar();
29 }
30
31 public void bar(@UnderInitialization(B.class) B this) {}
32 }
33 }