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

Add support for readonly/const/final function parameters #345

Closed
johndog opened this issue Jan 27, 2017 · 2 comments
Closed

Add support for readonly/const/final function parameters #345

johndog opened this issue Jan 27, 2017 · 2 comments

Comments

@johndog
Copy link

johndog commented Jan 27, 2017

In a nutshell, add a feature so that the answer to this SO question is "yes":

http://stackoverflow.com/questions/2339074/can-parameters-be-constant

Probably shouldn't be a breaking change for API writers, since it only needs to be enforced in the locality of the function itself. The purpose would be to make sure parameters aren't written over (i.e. used as temp variables) in the implementation.  Purpose is not to provide any guarantees to the caller.

@pharring
Copy link
Member

This has been proposed many times (for C#) and is tracked at dotnet/roslyn#115
Recommend closing this issue and moving the discussion to the roslyn repo.

@johndog
Copy link
Author

johndog commented Jan 27, 2017

I knew it couldn't be new, just couldn't find it.

@johndog johndog closed this as completed Jan 27, 2017
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

2 participants