[Issue 14406] New: GIT HEAD ignores forward reference and generates wrong code
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Apr 4 18:11:42 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14406
Issue ID: 14406
Summary: GIT HEAD ignores forward reference and generates wrong
code
Product: D
Version: unspecified
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: puneet at coverify.org
Reduced test.
// assertion fails -- both bar_obj and foo should be null though
class Foo {}
string str_mixin(T)() {
alias P = Poo!T;
return "Bar bar_obj;
static class Bar { Foo foo; }";
}
template Poo(T) {
static if(T.tupleof.length) {};
}
class Frop {
mixin(str_mixin!(typeof(this)));
}
void main() {
Frop simple = new Frop;
assert(simple.bar_obj.foo is null, "foo is not null");
}
--
More information about the Digitalmars-d-bugs
mailing list