Mercurial > projects > dstress
comparison compile/m/mixin_35_B.d @ 1524:b5f3f03b37ad
[Issue 1113] Mixin causes incorrect static if branching
Reiner Pope <reiner.pope@gmail.com>
2007-04-08
http://d.puremagic.com/issues/show_bug.cgi?id=1113
author | thomask |
---|---|
date | Fri, 27 Apr 2007 17:27:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1523:8a8d5cb8775c | 1524:b5f3f03b37ad |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Reiner Pope <reiner.pope@gmail.com> | |
6 // @date@ 2007-04-08 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1113 | |
8 // @desc@ [Issue 1113] Mixin causes incorrect static if branching | |
9 | |
10 module dstress.compile.m.mixin_35_B; | |
11 | |
12 template Foo(){ | |
13 char[] dummy; | |
14 | |
15 mixin("alias char[] TheType;"); | |
16 | |
17 static if (is(TheType : char[])) | |
18 const int Bar = 13; | |
19 else | |
20 static assert(false); | |
21 } | |
22 | |
23 static assert(13 == Foo!().Bar); |