Skip to content

Write test case for compilation ordering bug #1559

@wmdietl

Description

@wmdietl

#1536 was a tricky issue to debug. Seemingly out of nowhere, Ubuntu 24.04 CI runs started failing. Downgrading to Ubuntu 22.04 fixed it.

#1558 finally fixed the issue, by handling PARAMETER and TYPE_PARAMETER elements when finding the corresponding source code.
#1558 unfortunately did not fix the issue.

Copilot reasoned that the order of compilation must have changed between these two versions of Ubuntu and that this inconsistent handling of two elements resulted in the incompatible type.

It would be nice to confirm this and have a reproducible test case, using jtreg, where we control the compilation order. (See

* @compile/fail/ref=errorAB.out -XDrawDiagnostics -processor org.checkerframework.checker.nullness.NullnessChecker ClassA.java ClassB.java
for an example.)

Look at the error message in #1536. Look at the involved classes. Look at whether one is @AnnotatedFor and the other is not. Write minimal test classes that reproduce the failure before #1558 and ensure the error is fixed after #1558.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions