comparison run/a/alias_31_D.d @ 1534:345207906be7

updated to DMD-1.013
author thomask
date Mon, 07 May 2007 05:19:35 +0000
parents b8c0195059d9
children
comparison
equal deleted inserted replaced
1533:ac560364010c 1534:345207906be7
10 10
11 template StructOf(Type){ 11 template StructOf(Type){
12 struct StructOf{ 12 struct StructOf{
13 Type val; 13 Type val;
14 14
15 template ref(){ 15 template ref_tmpl(){
16 alias val ref; 16 alias val ref_tmpl;
17 } 17 }
18 } 18 }
19 } 19 }
20 20
21 int main(){ 21 int main(){
22 auto c = new StructOf!(int)(); 22 auto c = new StructOf!(int)();
23 int x = 3; 23 int x = 3;
24 24
25 c.ref!() = x; 25 c.ref_tmpl!() = x;
26 26
27 if(c.ref!() == 3){ 27 if(c.ref_tmpl!() == 3){
28 return 0; 28 return 0;
29 } 29 }
30 } 30 }
31 31