[Issue 18422] String members and parameters cannot be mixed in, even during CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 11 19:39:37 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18422

--- Comment #4 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to ag0aep6g from comment #3)
> (In reply to Andrei Alexandrescu from comment #2)
> > Happy to oblige!
> > 
> > struct Data
> > {
> >     string name;
> >     string type;
> >     string qualifier;
> >     string[] attributes;
> > }
> > 
> > Then the module can give you all top-level data declarations:
> > 
> > enum Data[] d = Module("mypack.mymod").data;
> > ...
> 
> Eh? Previously it was "function declarations", now it's "data declarations".
> And you've not given an implementation of either.

Somebody's in a testy mood :o). It was quicker to exemplify with data. Will
follow up with a working sample.

--


More information about the Digitalmars-d-bugs mailing list