Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mernst opened this issue Jan 8, 2021 · 0 comments
Open

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

mernst opened this issue Jan 8, 2021 · 0 comments

Comments

@mernst
Copy link
Collaborator

mernst commented Jan 8, 2021

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"}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant