# HG changeset patch # User Christian Kamm # Date 1219694707 -7200 # Node ID c82cb55ee1ea5a549f868d464eb39bd70f057818 # Parent d20691fd37afc01f890718622d0781739cbf80c7 Fix module headers. Move static_34_A to nocompile: cannot call new for a nested class within a static function. diff -r d20691fd37af -r c82cb55ee1ea nocompile/s/static_34_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/static_34_A.d Mon Aug 25 22:05:07 2008 +0200 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Kris +// @date@ 2005-10-28 +// @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5233 + +// __DSTRESS_ELINE__ 17 + +module dstress.nocompile.s.static_34_A; + +int main(){ + class C{ + static C create(){ + // ERROR: needs context for newing nested class + return new C; + } + } + + C c1 = new C; + assert(c1); + + C c2 = c1.create(); + assert(c2); + + C c3 = C.create(); + assert(c3); + + return 0; +} + diff -r d20691fd37af -r c82cb55ee1ea run/s/static_34_A.d --- a/run/s/static_34_A.d Mon Aug 25 21:56:28 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Kris -// @date@ 2005-10-28 -// @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5233 - -module dstress.run.s.static_34_A; - -int main(){ - class C{ - static C create(){ - return new C; - } - } - - C c1 = new C; - assert(c1); - - C c2 = c1.create(); - assert(c2); - - C c3 = C.create(); - assert(c3); - - return 0; -} - diff -r d20691fd37af -r c82cb55ee1ea run/t/template_61_C.d --- a/run/t/template_61_C.d Mon Aug 25 21:56:28 2008 +0200 +++ b/run/t/template_61_C.d Mon Aug 25 22:05:07 2008 +0200 @@ -7,9 +7,7 @@ // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1143 // @desc@ [Issue 1143] Assertion failure: '0' on line 850 in 'template.c' - On specialization of IFTI template parameters. -// __DSTRESS_ELINE__ 18 - -module dstress.nocompile.t.template_61_C; +module dstress.run.t.template_61_C; void foo(T, U : float = T)(char[] data, T t){ }