Bug 10283 – ICE(interpret.c): passing struct with failed initalizer to CTFE

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-06T05:38:00Z
Last change time
2015-06-09T05:10:38Z
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2013-06-06T05:38:37Z
Repy blah(Repy xxx) { return xxx; } Repy repy = blah(Repy()); struct Repy { string source = 7; } --- bug.d(7): Error: cannot implicitly convert expression (7) of type int to string CTFE: ErrorExp in bug.d(3) dmd: interpret.c:310: static int CompiledCtfeFunction::walkAllVars(Expression*, void*): Assertion `0' failed. Aborted This is a failure of error propagation.
Comment #1 by github-bugzilla — 2013-06-07T03:49:11Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/453da5f5619c287c31ddb524884aea8ce70d3fc1 Fix bug 10283 ICE(interpret.c): passing struct with failed initializer to CTFE If a struct literal contains an error field, it's an error.