Mercurial > projects > dstress
changeset 190:f29443c7054c
1) super()
2) "=" -> ":=" in the Makefile
Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn>
200-12-10
news:sr8p82-lu3.ln1@kuehne.cn
nntp://digitalmars.com/digitalmars.D.bugs/2528
author | thomask |
---|---|
date | Fri, 10 Dec 2004 19:13:38 +0000 |
parents | e0bcd344aa2b |
children | c5cbab12376d |
files | Makefile nocompile/super_09.d run/super_06.d run/super_07.d run/super_08.d todo.txt |
diffstat | 6 files changed, 133 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Thu Dec 09 07:44:29 2004 +0000 +++ b/Makefile Fri Dec 10 19:13:38 2004 +0000 @@ -22,53 +22,53 @@ # dir: temp objects will be placed there ifndef OBJ_DIR -OBJ_DIR = obj +OBJ_DIR := obj endif # file: append compiler messages and runtime assertions # NOTE: this has to be an absolut path (required for some complex.mak files) ifndef LOG -LOG = $(PWD)/log.txt +LOG := $(PWD)/log.txt endif # executeable: the compiler ifndef DMD -DMD = dmd +DMD := dmd endif # executeable: a GNU findutils compatible find (e.g.: find path -regex "?\\.*something") ifndef FIND -FIND = find +FIND := find endif # executeable: remove zero or more files (e.g.: rm -f a b c) ifndef RM -RM = rm -f +RM := rm -f endif # executeable: change to a given dir (e.g. cd some/other/dir) ifndef CD -CD = cd +CD := cd endif # executeable: display a message test (e.g. echo "something to say) ifndef ECHO -ECHO = echo +ECHO := echo endif # executeable: update the timestamp of an existing file or create a new empty file ifndef TOUCH -TOUCH = touch +TOUCH := touch endif # executeable: detect if stdin contains "Internal error" (dmd) or "gcc.gnu.org/bugs" (gcd) ifndef GREP -GREP = grep -s '\(Internal error\)\|\(gcc.gnu.org/bugs\)' > /dev/null 2>&1 +GREP := grep -s '\(Internal error\)\|\(gcc.gnu.org/bugs\)' > /dev/null 2>&1 endif # executeable: used to concat files ifndef CAT -CAT = cat +CAT := cat endif ############################################################################### @@ -80,24 +80,26 @@ ############################################################################### # tools -return__ = ./return__ -ifeq__ = ./ifeq__ -extract__ = ./extract__ +return__ := ./return__ +ifeq__ := ./ifeq__ +extract__ := ./extract__ # settings -to_log = >> $(LOG) 2>&1 -ext_run = exe -ext_norun = bin -ext_nocompile = no -ext_compile = o -ext_source = d -ext_source_html = html -ext_log = log -complex_todo = complex.mak -complex_done = complex.done -flag_pattern = __DSTRESS_DFLAGS__ +to_log := >> $(LOG) 2>&1 +ext_run := exe +ext_norun := bin +ext_nocompile := no +ext_compile := o +ext_source := d +ext_source_html := html +ext_log := log +complex_todo := complex.mak +complex_done := complex.done +flag_pattern := __DSTRESS_DFLAGS__ .PHONY: all basic_tools compile nocompile run norun complex clean distclean clean_log log + +.SUFFIXES: $(ext_run) $(ext_norun) $(ext_nocompile) $(ext_compile) # # test everything # @@ -121,7 +123,7 @@ # # include complex test cases # -complex_makefiles = $(sort $(shell $(FIND) complex -regex ".*$(complex_todo)")) +complex_makefiles := $(sort $(shell $(FIND) complex -regex ".*$(complex_todo)")) include $(complex_makefiles) #
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/super_09.d Fri Dec 10 19:13:38 2004 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Base$ + +// @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> +// @date@ 200-12-10 +// @uri@ news:sr8p82-lu3.ln1@kuehne.cn +// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2528 + +// call to "this" before "super" + +module dstress.nocompile.super_09; + +size_t status; + +class Parent{ + this(int dummy){ + } +} + +class Child{ + this(){ + status = cast(int) this; + super(0); + } +} + +int main(){ + Child o = new Child(); + return status & 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/super_06.d Fri Dec 10 19:13:38 2004 +0000 @@ -0,0 +1,21 @@ +// $HeadURL$ +// $Date$ +// $Base$ + +// @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> +// @date@ 200-12-10 +// @uri@ news:sr8p82-lu3.ln1@kuehne.cn +// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2528 + +module dstress.run.super_06; + +class MyClass : Object{ + this(){ + super(); + } +} + +int main(){ + MyClass o = new MyClass(); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/super_07.d Fri Dec 10 19:13:38 2004 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Base$ + +// @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> +// @date@ 200-12-10 +// @uri@ news:sr8p82-lu3.ln1@kuehne.cn +// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2528 + +module dstress.run.super_07; + +class Parent{ +} + +class Child{ + this(){ + super(); + } +} + +int main(){ + Child o = new Child(); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/super_08.d Fri Dec 10 19:13:38 2004 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Base$ + +// @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> +// @date@ 200-12-10 +// @uri@ news:sr8p82-lu3.ln1@kuehne.cn +// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2528 + +module dstress.run.super_08; + +int dummy; + +class Parent{ + this(){ + dummy++; + } +} + +class Child{ + this(){ + super(); + } +} + +int main(){ + Child o = new Child(); + return dummy-1; +}
--- a/todo.txt Thu Dec 09 07:44:29 2004 +0000 +++ b/todo.txt Fri Dec 10 19:13:38 2004 +0000 @@ -34,6 +34,7 @@ * keyword: private * keyword: protected * keyword: public +* keyword: return (enclosing finally clauses, synchronization objects) * keyword: struct (anonymous) * keyword: synchronized * keyword: typeid (alias, typedef, union, ?functions, ?delegates)