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 9230 - Incorrect implicit immutable conversion occurs in pure function #1418

Merged
merged 2 commits into from Dec 28, 2012

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Dec 28, 2012

http://d.puremagic.com/issues/show_bug.cgi?id=9230

hasMutableIndirectionParams() is based on the old TypeFunction::purityLevel() (before fixing issue 8408). So its result is consistent with TypeFunction::purityLevel() != PUREstrong in 2.060. Then it fixes the regression.

…re function

`hasMutableIndirectionParams()` is based on the old `TypeFunction::purityLevel()` (before fixing issue 8408). So its result is consistent with `TypeFunction::purityLevel() != PUREstrong` in 2.060. Then it *fixes* the regression.
* FIXME: This function is a workaround for fixing Bugzilla 9210.
* In 2.061, TypeFunction::purityLevel() improved to make more functions
* strong purity, but immutable conversion on return statemet had broken by that.
* Because, it is essentially unrelated to PUREstring. This function is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/PUREstring/PUREstrong ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix.

Also updated test cases. By a recent change in 2.061 (4b2767e), direct returning of NewExp sometimes avoids immutable implicit conversion. So, test5081 should return mutable array values through local variables.
@9rnsr
Copy link
Contributor Author

9rnsr commented Dec 28, 2012

Updated.

WalterBright added a commit that referenced this pull request Dec 28, 2012
Issue 9230 - Incorrect implicit immutable conversion occurs in pure function
@WalterBright WalterBright merged commit c42d35b into dlang:master Dec 28, 2012
WalterBright added a commit that referenced this pull request Dec 28, 2012
Issue 9230 - Incorrect implicit immutable conversion occurs in pure function
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Feb 5, 2013
- Revert "Merge pull request dlang#1418 from 9rnsr/fix9230"

  This reverts commit c42d35b, reversing
  changes made to 9f2d9ea.

- Revert "Merge pull request dlang#1110 from 9rnsr/fix8408"

  This reverts commit b6a8093, reversing
  changes made to 3b06132.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants