[Issue 23279] Segmentation fault on mixin template + using unknown type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 2 13:47:32 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23279

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |b2.temp at gmx.com
           Hardware|x86                         |All
                 OS|Windows                     |All

--- Comment #5 from Basile-z <b2.temp at gmx.com> ---
The thing is that for `__traits(hasMember, Tester, "setIt")`, DMD gags the
errors during semantic of `Tester.setIt`. 

```
        if (e.ident == Id.hasMember)
        {
            /* Take any errors as meaning it wasn't found
             */
            ex = ex.trySemantic(scx); // try == gag
            return ex ? True() : False();
        } 
```

During that same step, the semantic pass for the bad function is also executed
(since it's a forward ref) but the error for the bad identifier is just ignored
and compilation continues. Finally DMD reaches the code in glue.d and then an
assertion fails.

--


More information about the Digitalmars-d-bugs mailing list