Method doesn't compile when defined in a mixin, but is fine without?

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 2 12:00:04 PDT 2016


On Sunday, 1 May 2016 at 14:01:51 UTC, pineapple wrote:
> On Sunday, 1 May 2016 at 13:46:14 UTC, ag0aep6g wrote:
>> On 01.05.2016 15:32, pineapple wrote:
>>> static string vectorpropertymixin(string name, string 
>>> SDL_getter, string
>>> SDL_setter){
>> [...]
>>> mixin(vectorpropertymixin(
>>>      "minsize", "SDL_GetWindowMinimumSize", 
>>> "SDL_GetWindowMinimumSize"
>>> ));
>>
>> Should the second one be "SDL_SetWindowMinimumSize" here? 
>> ("Set" instead of "Get".)
>
> See, of course it was going to be something stupid like that. 
> Would be nice if compile errors were kinder to mixins, might've 
> realized where the error actually was. Any tips on that?

Write code into a file or wait for my ctfe-debug tool.


More information about the Digitalmars-d-learn mailing list