Pure-D / workspace-d

CLI deprecated, API + functionality moved into https://github.com/Pure-D/serve-d
MIT License
75 stars 15 forks source link

fix build error with enum #62

Closed alphaKAI closed 7 years ago

alphaKAI commented 7 years ago

Fixed Build error with enum.

enum couldn't be initialized with class or pointer to enum, use immutable or static immutable. In this context(global level), static is doing nothing but it can emphasize that the variable is a constant.

alphaKAI commented 7 years ago

dmd says:

source/com/dub.d(433,6): Error: variable workspaced.com.dub.harmlessExceptionFormat : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
WebFreak001 commented 7 years ago

Confirmed fixing a build issue on dmd ~master (2.073) but on the latest stable release there is no issue yet. I will keep this open and wait for 2.073 to get released as stable release.

If the issue then still persists please add a static if(__VERSION__ >= 2073) and keep the current code in the else block or use mixins if it doesn't work.

WebFreak001 commented 7 years ago

Was just a temporary compiler issue, PR no longer needed