Bug 12476 – Assert error in interpret.c:3204

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-26T15:13:00Z
Last change time
2014-04-07T15:39:40Z
Keywords
ice, industry, pull
Assigned to
nobody
Creator
jcrapuchettes

Comments

Comment #0 by jcrapuchettes — 2014-03-26T15:13:17Z
The following code will cause DMD to have the following assertion thrown: dmd: interpret.c:3204: virtual Expression* BinExp::interpret(InterState*, CtfeGoal): Assertion `0' failed. It appears to be a problem with Foo having an alias to a template that doesn't "return" anything while trying to access that alias through an "alias this". Code: --- template A(T) { } struct Foo(T) { alias B = A!T; } struct Bar { Foo!int baz; alias baz this; } import std.traits; enum h = hasMember!(Bar, "B"); ---
Comment #1 by k.hara.pg — 2014-04-07T05:55:10Z
Comment #2 by github-bugzilla — 2014-04-07T10:45:43Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9a7f2a251ecf74852b30e3980d7192953ff44985 fix Issue 12476 - Assert error in interpret.c:3204 https://github.com/D-Programming-Language/dmd/commit/caf5992b236deaee860e9e5a1e1caa9e5f849db9 Merge pull request #3433 from 9rnsr/fix12476 Issue 12476 - Assert error in interpret.c:3204