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

PVL frontend generates permissions over final fields in implicit constructor #1011

Closed
bobismijnnaam opened this issue Apr 13, 2023 · 0 comments · Fixed by #1075
Closed

PVL frontend generates permissions over final fields in implicit constructor #1011

bobismijnnaam opened this issue Apr 13, 2023 · 0 comments · Fixed by #1075
Labels
A-Bug F-PVL Frontend: PVL

Comments

@bobismijnnaam
Copy link
Contributor

bobismijnnaam commented Apr 13, 2023

On dev, the following input:

class C {
  final int x;
}

Yields:

======================================
At finalPerm.pvl:2:1:
--------------------------------------
    1
      [-----------
    2  class C {
    3    final int x;
    4  }
       -]
    5
    6
--------------------------------------
Specifying permission over final fields is not allowed, since they are treated as constants.
======================================

The error goes away if you specify an explicit constructor without permissions. I'm guessing permissions get generated for the final fields, where this should actually not happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Bug F-PVL Frontend: PVL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants