On Wednesday, 25 May 2022 at 01:23:56 UTC, Steven Schveighoffer wrote:

"of course" I have no idea what your real code looks like, unless you post the real code.

While I get the point of trying to slim down the example to something postable, a very common problem with this kind of self-trimming is that you end up trimming out the problematic code. Why? Because if you noticed the problematic code, you wouldn't be posting here, you would just fix it. This, in fact, happens to me frequently.

Now, it's also possible that there is an actual compiler bug here, it certainly seems like it could be, but a full (non-)working example would be useful.

I still highly recommend trying code like:

```d
import std.traits;
pragma(msg, fullyQualifiedName!fun);
```

inside the place where your assert is failing. To me, if it's using the expected symbol for `fun` (or whatever it's called), then it should print the definition you expect from the module you expect. If not, maybe there is a name conflict, and it's picking the wrong one? These problems can be tricky to find.

-Steve

Sorry, this was not affront, it was meant as my POV that you may have problems to get my problem because I have (as usually) forgot to make this more visible that some code was truncated.

I tried your suggestion, as replied to Adam - the symbol is unique and it shows that correct location. It's not different from the error message.

However, this error has nothing to do with `assert()`. In fact the compiler allows nothing than invocation or this error will be triggered. Even that fails:

```d
// same error:
auto test = cast(void*)fun;
```

Reply via email to