Debug help - opDispatch - unknown member function

Dejan Lekic dejan.lekic at gmail.com
Tue Sep 9 12:45:02 UTC 2025


On Tuesday, 9 September 2025 at 12:04:07 UTC, Brother Bill wrote:
>
> When commenting out the callHome() in struct C, it fails.
> Obviously if callHome() is explicitly created, it works.

If C does not have callHome() method, then

```d
     mixin("content." ~ name)(vals);

```

will simply fail, because that line effectively generates this 
code:

```d
     content.callHome("foo", "bar");
```

Since content is of type C, which does not have callHome method, 
it will fail, and is expected to fail. Sorry I can't think of a 
better explanation than what I tried in my previous post... Since 
I can't come up with a better explanation I will stop writing in 
this thread. Good luck!


More information about the Digitalmars-d-learn mailing list