← Back to index
|
Original Bugzilla link
Bug 3291 – Bad codegen when using templates with a named mixin as a parameter
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2009-09-03T13:16:00Z
Last change time
2016-08-09T22:03:56Z
Keywords
wrong-code
Assigned to
nobody
Creator
2korden
Comments
Comment #0
by 2korden — 2009-09-03T13:16:21Z
template Magic() { int magic; } struct Item { mixin Magic A; } struct Foo(alias S) { } void main() { Item* i1 = new Item; Item* i2 = new Item; Foo!(Item.A) bar; // comment-out this line for a successful run assert(i2.A.magic == 0); i1.A.magic = 42; assert(i2.A.magic == 0); }
[email protected]
(24): Assertion failure
Comment #1
by ag0aep6g — 2016-08-09T22:03:56Z
Assert passes since 2.061. Closing as WORKSFORME.