diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-06-28 08:12:07 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-06-28 08:12:07 (GMT) |
commit | 8219fb26323aa59d5e46299099e965049a0cb654 (patch) | |
tree | c63c987d34f5450b58b1f5e30b0fa2b424798de1 /generic/tclOOScript.h | |
parent | 082e8c6d7aa61e4250a321d2d44ca57c8d09049d (diff) | |
download | tcl-8219fb26323aa59d5e46299099e965049a0cb654.zip tcl-8219fb26323aa59d5e46299099e965049a0cb654.tar.gz tcl-8219fb26323aa59d5e46299099e965049a0cb654.tar.bz2 |
Tests for abstract and singleton
Diffstat (limited to 'generic/tclOOScript.h')
-rw-r--r-- | generic/tclOOScript.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclOOScript.h b/generic/tclOOScript.h index 73c3383..22f5e56 100644 --- a/generic/tclOOScript.h +++ b/generic/tclOOScript.h @@ -143,8 +143,9 @@ static const char *tclOOSetupScript = " variable object\n" " unexport create createWithNamespace\n" " method new args {\n" -" if {![info exists object]} {\n" +" if {![info exists object] || ![info object isa object $object]} {\n" " set object [next {*}$args]\n" +" ::oo::objdefine $object unexport destroy\n" " }\n" " return $object\n" " }\n" |