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

pineapple via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 1 07:01:51 PDT 2016


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?



More information about the Digitalmars-d-learn mailing list