annotate nocompile/s/static_34_A.d @ 1589:c82cb55ee1ea

Fix module headers. Move static_34_A to nocompile: cannot call new for a nested class within a static function.
author Christian Kamm <kamm incasoftware de>
date Mon, 25 Aug 2008 22:05:07 +0200
parents run/s/static_34_A.d@b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
731
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
1 // $HeadURL$
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
2 // $Date$
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
3 // $Author$
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
4
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
5 // @author@ Kris <du@bar.com>
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
6 // @date@ 2005-10-28
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 731
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5233
731
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
8
1589
c82cb55ee1ea Fix module headers.
Christian Kamm <kamm incasoftware de>
parents: 1489
diff changeset
9 // __DSTRESS_ELINE__ 17
c82cb55ee1ea Fix module headers.
Christian Kamm <kamm incasoftware de>
parents: 1489
diff changeset
10
c82cb55ee1ea Fix module headers.
Christian Kamm <kamm incasoftware de>
parents: 1489
diff changeset
11 module dstress.nocompile.s.static_34_A;
731
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
12
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
13 int main(){
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
14 class C{
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
15 static C create(){
1589
c82cb55ee1ea Fix module headers.
Christian Kamm <kamm incasoftware de>
parents: 1489
diff changeset
16 // ERROR: needs context for newing nested class
731
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
17 return new C;
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
18 }
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
19 }
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
20
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
21 C c1 = new C;
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
22 assert(c1);
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
23
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
24 C c2 = c1.create();
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
25 assert(c2);
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
26
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
27 C c3 = C.create();
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
28 assert(c3);
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
29
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
30 return 0;
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
31 }
c56770fab949 Kris <du@bar.com>
thomask
parents:
diff changeset
32