← Back to index
|
Original Bugzilla link
Bug 20630 – Illegal instruction: when passing enum:string to function taking a dstring
Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2020-03-03T15:38:37Z
Last change time
2024-12-13T19:07:22Z
Assigned to
No Owner
Creator
Felix Hufnagel
Moved to GitHub: dmd#17942 →
Comments
Comment #0
by puremagic — 2020-03-03T15:38:37Z
import std.stdio; struct VariableDefinition { string lex; } enum LOCALVARS = [ VariableDefinition("#1"), ]; void foo(dstring s) { writeln(s); } void main(string[] args) { foo(LOCALVARS[0].lex); } this results in Illegal instruction (core dumped) with DMD 2.090.1 and DMD Beta 2.091.0-beta.1 interestingly ldc2 1.19.0 reports the correct error
Comment #1
by robert.schadek — 2024-12-13T19:07:22Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/17942
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB