Skip to content

KeY does not know that enum constants are non-null #3670

@FliegendeWurst

Description

@FliegendeWurst

Description

KeY seemingly doesn't have a rule that makes enum constants non-null.

Reproducible

always

Steps to reproduce

Try to prove the contract below.

File Severity.java

public enum Severity {
    INFO,
    WARNING,
    CRITIQUE	
}

File Checker.java

public class Checker {
    /*@ public normal_behaviour
      @ ensures \result != null;
      @*/
    Severity checkIt() {
        return Severity.INFO;
    }
}

Additional information


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions