[Issue 21580] New: The D compiler adds an extra (void*) member in unittest
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 25 08:56:05 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21580
Issue ID: 21580
Summary: The D compiler adds an extra (void*) member in
unittest
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: cr at tagion.org
Created attachment 1814
--> https://issues.dlang.org/attachment.cgi?id=1814&action=edit
Example
I discovered something odd when I put a struct into an unittest.
If you place a struct inside an unittest with a mixin template the compiler
adds an extract (void*) element to the struct.
carsten at spaceship:/tmp> dmd unittest_odd_void_ptr.d -unittest
(int, string)
(int, string, void*)
(int, string)
carsten at spaceship:/tmp> ldc2 unittest_odd_void_ptr.d -unittest
(int, string)
(int, string, void*)
(int, string)
See the attached code.
It is not a practical problem. I just found it a little odd and properly there
is an explanation.
Keep up the good work.
Best Regards
Carsten
--
More information about the Digitalmars-d-bugs
mailing list