Perhaps someone can help explain this mystery. I've got a working system, except when it's coming to an unknown function inside my structs.

Perhaps to note opDispatch is added via a mixin template, not sure if that makes a difference.

Error: function expected before (), not 'this.polyBase.opDispatch!("orig")'

  struct Base {
    PolyMorph polyBase;
    alias polyBase this;

    string callsOrig() {
      return orig(); //dies here
    }
  }

  //opDispatch signature
  auto ref opDispatch(string fun, Args ...)(auto ref Args args);

Reply via email to