Bug 19401 – Fix bug in core.internal.traits.hasElaborateDestructor & hasElaborateCopyConstructor for struct with static array alias & for nested structs/unions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-11-14T09:23:58Z
Last change time
2018-11-14T13:04:26Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-11-14T09:23:58Z
Example: https://run.dlang.io/is/6k5F17 --- import std.stdio; struct S { int[4] a; alias a this; enum length = 1; ~this() { writeln("elaborate!"); } } void main() { import std.traits : hasElaborateDestructor1 = hasElaborateDestructor; import core.internal.traits : hasElaborateDestructor2 = hasElaborateDestructor; writeln(hasElaborateDestructor1!S); writeln(hasElaborateDestructor2!S); } ---
Comment #1 by github-bugzilla — 2018-11-14T13:04:25Z
Commit pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/a87fe49e9b72ef0d15a42c6363b3aea0057f7b86 Fix Issue 19401 - Fix hasElaborateDestructor & hasElaborateCopyConstructor for struct with static array alias & for nested structs/unions