Thread overview
[Issue 23279] Segmentation fault on mixin template + using unknown type
6 days ago
RazvanN
6 days ago
RazvanN
1 day ago
RazvanN
August 01
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #1 from Marcelo Silva Nascimento Mancini <msnmancini@hotmail.com> ---
This error occurs only on DMD with this test code. But in my project it does not work in both, and I do get "Error: unknown, please file report on issues.dlang.org" instead of a segmentation fault. But 99% chance they are related

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

Marcelo Silva Nascimento Mancini <msnmancini@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msnmancini@hotmail.com

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

--- Comment #2 from Marcelo Silva Nascimento Mancini <msnmancini@hotmail.com> ---
So, the "unknown error" message seems to be caused when that program is built with the unknown type available and it generates the binary for it then the program seems to abort.

When I said that LDC doesn't suffer from this problem I was actually wrong in my statement, it builds and run with the unknown type in the code (probably because it strips something out)

--
6 days ago
https://issues.dlang.org/show_bug.cgi?id=23279

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #3 from RazvanN <razvan.nitu1305@gmail.com> ---
Reduced:

```
class Tester
{
    enum a = __traits(hasMember, Tester, "setIt");
    void setIt(Sth sth){}
}
```

--
6 days ago
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #4 from RazvanN <razvan.nitu1305@gmail.com> ---
It seems like `__traits(hasMember)` gets confused by the forward reference.
Putting the `traits(hasMember)` it after the declaration of `setIt` does not
result in an ice.

--
1 day ago
https://issues.dlang.org/show_bug.cgi?id=23279

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical

--