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

Forbid (never, never) #6800

Merged
merged 2 commits into from
Jan 10, 2018
Merged

Conversation

elnabo
Copy link
Contributor

@elnabo elnabo commented Jan 1, 2018

At the moment, it is possible to compile code with variable that can be never read nor set.

var useless (never, never) : Int

I propose to make it raise compilation error in the same way as:

var forbidden (get, default) : Int

@back2dos
Copy link
Member

back2dos commented Jan 1, 2018

Why would you disallow (get, default)?

@elnabo
Copy link
Contributor Author

elnabo commented Jan 1, 2018

I'm also wondering.

@ncannasse
Copy link
Member

You can do (set = AccNever and get = AccNever)

@elnabo
Copy link
Contributor Author

elnabo commented Jan 8, 2018

In the same way, is there a reason anymore for not having (set = AccNormal && get = AccCall).

@ncannasse ncannasse merged commit 57b9da7 into HaxeFoundation:development Jan 10, 2018
@ncannasse
Copy link
Member

Thanks!

@elnabo elnabo deleted the nevernever branch January 10, 2018 08:49
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

Successfully merging this pull request may close these issues.

3 participants