annotate run/t/template_class_19_A.d @ 1302:ec017b93fe95

[Issue 524] Compiler crash when compiling Nazo Humei <lovesyao@hotmail.com> 2006-11-26 http://d.puremagic.com/issues/show_bug.cgi?id=524
author thomask
date Sun, 31 Dec 2006 02:00:00 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1302
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
1 // $HeadURL$
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
2 // $Date$
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
3 // $Author$
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
4
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
5 // @author@ Nazo Humei <lovesyao@hotmail.com>
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
6 // @date@ 2006-11-26
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=524
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
8 // @desc@ [Issue 524] Compiler crash when compiling
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
9
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
10 module dstress.run.t.template_class_19_A;
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
11
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
12 int status;
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
13
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
14 class Outer{
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
15 void test(T)() {
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
16 status++;
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
17 new Inner!(T)();
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
18 }
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
19
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
20 class Inner(T) {
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
21 void test(){
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
22 status += 100;
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
23 new Inner!(T)();
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
24 }
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
25 }
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
26 }
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
27
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
28 int main(){
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
29 Outer o = new Outer();
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
30 o.test!(int);
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
31 if(status != 1){
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
32 assert(0);
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
33 }
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
34
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
35 return 0;
ec017b93fe95 [Issue 524] Compiler crash when compiling
thomask
parents:
diff changeset
36 }