Fix Issue 17684 - [REG 2.062] static alias this#7055
Fix Issue 17684 - [REG 2.062] static alias this#7055MartinNowak merged 1 commit intodlang:stablefrom JinShil:stable
Conversation
|
Thanks for your pull request, @JinShil! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
|
It looks like the Jenkins failure was due to network issues, so I've restarted the test pipeline there. |
test/runnable/test17684.d
Outdated
| StaticStruct = 42; | ||
| immutable int a = StaticStruct; | ||
| assert(a == 42); | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing final end of line. Consider setting up EditorConfig on your text editor, so that repo text editor settings - https://github.com/dlang/dmd/blob/master/.editorconfig - are automatically applied.
There was a problem hiding this comment.
Done. Thanks for the review.
PetarKirov
left a comment
There was a problem hiding this comment.
Looks good to me on a first glance, though expect more thorough review from the dmd devs.
Added newline at end of file
|
Weird language feature, but rather have it fully-working that half-working. Any specific use-case in mind? |
Yes, it's for my memory-mapped-io library where all registers and bitfields are modeled as static entities. I currently have to put a You'd probably question the pattern I've used in that library, but it was chosen due to other limitations in the D language (e.g. modules-must-be-files and a few others). It would take a detailed blog post to explain it, so if you really want to know, contact me offline. Long story short...it wasn't arrived at thoughtlessly. |
No description provided.