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

2023-07-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #9 from Dlang Bot  ---
dlang/dmd pull request #15417 "merge stable" was merged into master:

- 452e170d2ad0c547dd1a4fe45e21af0cde87565c by Razvan Nitu:
  Fix Issues 23951 and 23279 - traits(hasMember) does not follow alias this +
ICE when using traits(hasMember) on an erroneous member (#15406)

  * Fix Issue 23951 - traits(getMember) does not follow alias this

  * Fix Issue 23279 - ICE when using traits(hasMember) with an erroneous member

https://github.com/dlang/dmd/pull/15417

--


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

2023-07-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Dlang Bot  ---
dlang/dmd pull request #15406 "Fix Issues 23951 and 23279 - traits(hasMember)
does not follow alias this + ICE when using traits(hasMember) on an erroneous
member" was merged into stable:

- 1ad55f16b699d077c05034fe0678a5a05a73ed8a by RazvanN7:
  Fix Issue 23279 - ICE when using traits(hasMember) with an erroneous member

https://github.com/dlang/dmd/pull/15406

--


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

2023-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #7 from Dlang Bot  ---
@RazvanN7 updated dlang/dmd pull request #15406 "Fix Issue 23951 -
traits(getMember) does not follow alias this" fixing this issue:

- Fix Issue 23279 - ICE when using traits(hasMember) with an erroneous member

https://github.com/dlang/dmd/pull/15406

--


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

2023-01-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from Dlang Bot  ---
@SixthDot created dlang/dmd pull request #14778 "fix issue 23279 - `hasMember`
should not gag sema of forward references" fixing this issue:

- fix issue 23279 - `hasMember` should not gag sema of forward references

  `__traits(hasMember, e1, "e2")` works by looking if `e1.e2` is a valid
expression,
  gagging the semantic errors of the whole expression, however that should just
be done
  while `e2` is being analyzed.

https://github.com/dlang/dmd/pull/14778

--


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

2023-01-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

Basile-z  changed:

   What|Removed |Added

   Keywords||ice
 CC||b2.t...@gmx.com
   Hardware|x86 |All
 OS|Windows |All

--- Comment #5 from Basile-z  ---
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.

--


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

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


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

2022-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

RazvanN  changed:

   What|Removed |Added

   Severity|normal  |critical

--


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

2022-08-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #4 from RazvanN  ---
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.

--


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

2022-08-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #3 from RazvanN  ---
Reduced:

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

--


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

2022-07-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #2 from Marcelo Silva Nascimento Mancini  
---
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)

--


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

2022-07-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

Marcelo Silva Nascimento Mancini  changed:

   What|Removed |Added

 CC||msnmanc...@hotmail.com

--


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

2022-07-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23279

--- Comment #1 from Marcelo Silva Nascimento Mancini  
---
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

--