Skip to content

Fix Issue 20687 - Allow member function address as const initializer#10946

Merged
dlang-bot merged 1 commit intodlang:stablefrom
BorisCarvajal:mptr_constinit
Mar 20, 2020
Merged

Fix Issue 20687 - Allow member function address as const initializer#10946
dlang-bot merged 1 commit intodlang:stablefrom
BorisCarvajal:mptr_constinit

Conversation

@BorisCarvajal
Copy link
Copy Markdown
Member

It seems like an artificial restriction, seeing that you can use a manifest constant.

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request and interest in making D better, @BorisCarvajal! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
20687 normal Allow member function address as const initializer

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#10946"

@dlang-bot dlang-bot merged commit aba2dea into dlang:stable Mar 20, 2020
@ibuclaw
Copy link
Copy Markdown
Member

ibuclaw commented Mar 20, 2020

Do virtual functions still produce an error?

@BorisCarvajal
Copy link
Copy Markdown
Member Author

@ibuclaw Nope

@ibuclaw
Copy link
Copy Markdown
Member

ibuclaw commented Mar 20, 2020

Then there lies one possible problem. :-)

@BorisCarvajal
Copy link
Copy Markdown
Member Author

With great power comes great responsibility. ;)

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.

4 participants