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

Issue 7554 - Immutable function pointer arguments too #772

Merged
merged 1 commit into from
Feb 28, 2012

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Feb 28, 2012

@yebblies
Copy link
Member

I don't think this is the correct place to fix it. Back when I fixed 3797 and related bugs I tried to prevent propagating the modifiers to the function type. eg immutable(int function() immutable) should never exist, the inner immutable should be stripped/never added. This is legal because you can never modify data through a function pointer anyway.

I assume MODinvariant is being passed down to the function type during TypePointer::semantIc, this should probably be filtered.

Protect function type from inappropriate modifier transition.
@9rnsr
Copy link
Contributor Author

9rnsr commented Feb 28, 2012

@yebblies OK, your approach sounds good. I've changed the way.

WalterBright added a commit that referenced this pull request Feb 28, 2012
Issue 7554 - Immutable function pointer arguments too
@WalterBright WalterBright merged commit 461649b into dlang:master Feb 28, 2012
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