Bug 19306 – Explicit struct constructors aren't smart when the structs contain anonymous unions

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-10-14T22:16:16Z
Last change time
2024-12-13T19:00:57Z
Assigned to
No Owner
Creator
basile-z
Moved to GitHub: dmd#19496 →

Comments

Comment #0 by b2.temp — 2018-10-14T22:16:16Z
struct Foo { union { void delegate() a; void function() b; } ulong c; } void b(){} struct A {void a(){}} void main() { A a; Foo f0 = Foo(&a.a); // ok Foo f1 = Foo(&a.a, 0UL); // not allowed but should Foo f2 = Foo(&b, 0UL); // not allowed but should Foo f3 = Foo(&b); // not allowed but should }
Comment #1 by robert.schadek — 2024-12-13T19:00:57Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19496 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB