| 1 |
import org.checkerframework.checker.initialization.qual.Initialized; |
| 2 |
import org.checkerframework.checker.initialization.qual.UnknownInitialization; |
| 3 |
import org.checkerframework.checker.nullness.qual.NonNull; |
| 4 |
|
| 5 |
public class CommitmentFlow { |
| 6 |
|
| 7 |
@NonNull CommitmentFlow t; |
| 8 |
|
| 9 |
public CommitmentFlow(CommitmentFlow arg) { |
| 10 |
t = arg; |
| 11 |
} |
| 12 |
|
| 13 |
void foo( |
| 14 |
@UnknownInitialization CommitmentFlow mystery, |
| 15 |
@Initialized CommitmentFlow triedAndTrue) { |
| 16 |
CommitmentFlow local = null; |
| 17 |
|
| 18 |
local = mystery; |
| 19 |
// :: error: (method.invocation.invalid) |
| 20 |
local.hashCode(); |
| 21 |
|
| 22 |
local = triedAndTrue; |
| 23 |
local.hashCode(); // should determine that it is Committed based on flow |
| 24 |
} |
| 25 |
} |