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 4539 - Refuse assignment to string literal #188

Closed
wants to merge 2 commits into from

Conversation

yebblies
Copy link
Member

@yebblies yebblies commented Jul 1, 2011

This builds on #46
and fixes http://d.puremagic.com/issues/show_bug.cgi?id=4539

Disable using string literals as lvalues and change the dmd tests that rely on this behavior.

@donc
Copy link
Collaborator

donc commented Aug 17, 2011

It's clear that string literals should never be usable as modifiable lvalues, so test42 is clearly wrong.
But it's not at all obvious to me that they can't be const lvalues -- I can't see any problems with passing them by const ref. So I don't see a problem with xtest46.

@yebblies
Copy link
Member Author

That I can do. Thanks for reviewing these btw.

@dnadlinger
Copy link
Member

See also: pull request #164.

@yebblies
Copy link
Member Author

yebblies commented Sep 5, 2011

Closing as a duplicate of #164.

@yebblies yebblies closed this Sep 5, 2011
braddr pushed a commit to braddr/dmd that referenced this pull request Sep 15, 2011
GDC Win64 patch for Phobos2
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