Skip to content

Literal array creation with @PolyDet as the default type #221

@mernst

Description

@mernst

With @PolyDet as the default type, the code new String[] {} does not type-check:

MyFile.java:16: error: [determinism:invalid.array.component.type] array type (@PolyDet String @Det []) cannot have component type (@PolyDet)
    new String[] {}
    ^

Neither does new String[] {"hello"}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions