Bug 23328 – Segfault wrt. implicit function => delegate conversion in static initializers

Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-09-05T14:56:25Z
Last change time
2024-12-13T19:24:23Z
Keywords
backend
Assigned to
No Owner
Creator
kinke
Moved to GitHub: dmd#20145 →

Comments

Comment #0 by kinke — 2022-09-05T14:56:25Z
This segfaults at runtime with DMD v2.100.1: ``` struct S { string[] delegate() dg; string[] bla; } immutable S s = { dg: () => ["hello"], // works with explicit `delegate() => …` bla: ["blub"], }; void main() @safe { import std.stdio; writeln(s.bla); // segfault } ``` Works fine with LDC.
Comment #1 by robert.schadek — 2024-12-13T19:24:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20145 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB