On 10/10/2018 04:03 PM, James Japherson wrote:> Says that it cannot interpret X(the class that contains the static> opApply). It's a bit hard to diagnose the problem you're getting using that function when we don't have the code that uses it. Or the context that's referenced with the foreach loop there. You might want to post a larger segment of code and the entire error message.

The error I'm seeing that might be related is: opApply is a static member of the type. So part of the function (after mixins) reads:

    dg(X.opApply);

This attempts to call X.opApply with no arguments and pass the result to dg. But X.opApply requires an argument.

You probably want to add a `is(typeof(mixin("X." ~ m)) == cPiece)` in there.

  • static foreach James Japherson via Digitalmars-d-learn
    • Re: static foreach Neia Neutuladh via Digitalmars-d-learn

Reply via email to