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

Fix 17351 - Manifest constants can't sometimes be passed by ref in CTFE #11545

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

Geod24
Copy link
Member

@Geod24 Geod24 commented Aug 10, 2020

As mentioned in the comment, the fix is crude but works well.

@dlang-bot
Copy link
Contributor

dlang-bot commented Aug 10, 2020

Thanks for your pull request, @Geod24!

Bugzilla references

Auto-close Bugzilla Severity Description
17351 blocker Static const array can't be evaluated at compile time when passed as ref argument

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#11545"

@thewilsonator
Copy link
Contributor

Stable?

@Geod24
Copy link
Member Author

Geod24 commented Aug 10, 2020

Right, I guess I could do that :)

@Geod24
Copy link
Member Author

Geod24 commented Aug 10, 2020

Done

@UplinkCoder
Copy link
Member

@thewilsonator @Geod24 give me a couple minutes to review this before slapping an auto-merge on.

@UplinkCoder
Copy link
Member

@Geod24 please give it a fails complication tests which makes sure that modifications are impossible.

@Geod24
Copy link
Member Author

Geod24 commented Aug 10, 2020

@UplinkCoder : That's already covered by the type system, since the type is const or immutable. That's why I limited it to a test that ensures the right data is passed.

@ghost ghost removed the Severity:Enhancement label Aug 10, 2020
src/dmd/dinterpret.d Outdated Show resolved Hide resolved
…CTFE

As mentioned in the comment, the fix is crude but works well.
@UplinkCoder
Copy link
Member

I am okay with this.

@Geod24
Copy link
Member Author

Geod24 commented Aug 12, 2020

So can this make the next patch release ?

Copy link
Contributor

@AndrejMitrovic AndrejMitrovic left a comment

Choose a reason for hiding this comment

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

LGTM.

@AndrejMitrovic
Copy link
Contributor

I am okay with this.

Thanks. Let's go ahead with it I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants