Bug 14388 – ICE with idup-ed struct literal in template argument

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-01T13:43:00Z
Last change time
2015-06-17T21:04:16Z
Keywords
ice, pull
Assigned to
nobody
Creator
dransic

Comments

Comment #0 by dransic — 2015-04-01T13:43:41Z
Reduced test: --- struct Data(A a) { auto foo() { return Data!a.init; } } struct A { struct Item {} immutable(Item)[] items; this(int dummy) { items = [Item()].idup; // No error with .dup } } void main() { auto test = Data!(A(42)).init.foo(); } --- DMD 2.067.0: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 929.
Comment #1 by k.hara.pg — 2015-04-01T15:08:58Z
Comment #2 by github-bugzilla — 2015-04-18T03:34:32Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1ad31830eedeecacac4a10c261a99c2260bd2563 fix Issue 14388 - ICE with idup-ed struct literal in template argument https://github.com/D-Programming-Language/dmd/commit/d5b33f20debb342981b0e7837f966a1423a3db20 Merge pull request #4539 from 9rnsr/fix14388 Issue 14388 - ICE with idup-ed struct literal in template argument
Comment #3 by github-bugzilla — 2015-06-17T21:04:16Z