Skip to content

constructor's param cannot be open #9226

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

Closed
ohze opened this issue Jun 23, 2020 · 2 comments · Fixed by #9233
Closed

constructor's param cannot be open #9226

ohze opened this issue Jun 23, 2020 · 2 comments · Fixed by #9233

Comments

@ohze
Copy link

ohze commented Jun 23, 2020

Minimized code

class C(open: Int)

Output

[error] 1 |class C(open: Int)
[error]   |            ^
[error]   |             values cannot be open

Expectation

I know that open is a soft modifier

open is a soft modifier. It is treated as a normal identifier unless it is in modifier position.

But should it be treated as a normal identifier in this case?

@ohze ohze added the itype:bug label Jun 23, 2020
@nicolasstucki
Copy link
Contributor

Solution might be related to #9127

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jun 24, 2020
@nicolasstucki
Copy link
Contributor

Actually it looks like #9127 already fixed it

@nicolasstucki nicolasstucki linked a pull request Jun 24, 2020 that will close this issue
liufengyun added a commit that referenced this issue Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants