[Issue 3291] New: Bad codegen when using templates with a named mixin as a parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 3 13:16:22 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3291
Summary: Bad codegen when using templates with a named mixin as
a parameter
Product: D
Version: 2.031
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: 2korden at gmail.com
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);
}
core.exception.AssertError at test.d(24): Assertion failure
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list