# HG changeset patch # User thomask # Date 1172489295 0 # Node ID 2346dc04e49f3d9e032cb523b0e90fa635b56100 # Parent 5cd796ed85c3875fa80fe83ddf2f0885112802eb [Issue 981] CFTE fails in non-template and functions that takes no args. Kevin Bealer 2007-02-18 http://d.puremagic.com/issues/show_bug.cgi?id=981 diff -r 5cd796ed85c3 -r 2346dc04e49f run/b/bug_interpret_96_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_interpret_96_A.d Mon Feb 26 11:28:15 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Kevin Bealer +// @date@ 2007-02-18 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=981 +// @desc@ [Issue 981] CFTE fails in non-template and functions that takes no args. + +module dstress.run.b.bug_interpret_96_A; + +char[] foo(char[] text){ + return "abc" ~ text; +} + +struct S{ + const char[] x = foo("d"); +} + +int main(){ + S s; + if("abcd" != s.x){ + assert(0); + } + return 0; +} diff -r 5cd796ed85c3 -r 2346dc04e49f run/b/bug_interpret_96_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_interpret_96_B.d Mon Feb 26 11:28:15 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Kevin Bealer +// @date@ 2007-02-18 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=981 +// @desc@ [Issue 981] CFTE fails in non-template and functions that takes no args. + +module dstress.run.b.bug_interpret_96_B; + +char[] foo(char[] text){ + return "abc" ~ text; +} + +struct S(){ + const char[] x = foo("d"); +} + +int main(){ + S!() s; + if("abcd" != s.x){ + assert(0); + } + return 0; +} diff -r 5cd796ed85c3 -r 2346dc04e49f run/b/bug_interpret_96_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_interpret_96_C.d Mon Feb 26 11:28:15 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Kevin Bealer +// @date@ 2007-02-18 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=981 +// @desc@ [Issue 981] CFTE fails in non-template and functions that takes no args. + +module dstress.run.b.bug_interpret_96_C; + +char[] foo(){ + return "abc"; +} + +struct S(){ + const char[] x = foo(); +} + +int main(){ + S!() s; + if("abc" != s.x){ + assert(0); + } + return 0; +} diff -r 5cd796ed85c3 -r 2346dc04e49f run/b/bug_interpret_96_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_interpret_96_D.d Mon Feb 26 11:28:15 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Kevin Bealer +// @date@ 2007-02-18 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=981 +// @desc@ [Issue 981] CFTE fails in non-template and functions that takes no args. + +module dstress.run.b.bug_interpret_96_D; + +char[] foo(){ + return "abc"; +} + +struct S{ + const char[] x = foo(); +} + +int main(){ + S s; + if("abc" != s.x){ + assert(0); + } + return 0; +} diff -r 5cd796ed85c3 -r 2346dc04e49f run/b/bug_interpret_96_E.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_interpret_96_E.d Mon Feb 26 11:28:15 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Kevin Bealer +// @date@ 2007-02-18 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=981 +// @desc@ [Issue 981] CFTE fails in non-template and functions that takes no args. + +module dstress.run.b.bug_interpret_96_E; + +char[] foo(){ + return "abc"; +} + +struct S(T){ + const char[] x = foo(); +} + +int main(){ + S!(int) s; + if("abc" != s.x){ + assert(0); + } + return 0; +}