summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2020-01-01 16:01:36 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2020-01-01 16:01:36 (GMT)
commitb308bd97e6cdee90b11f3409a485253c414bbac0 (patch)
tree0294f25c5f1f534e2aadf23783cc8d87d2783a6b /tools
parentae24dd87fa424c374fc25dd2495ca5a5c874af95 (diff)
downloadtcl-b308bd97e6cdee90b11f3409a485253c414bbac0.zip
tcl-b308bd97e6cdee90b11f3409a485253c414bbac0.tar.gz
tcl-b308bd97e6cdee90b11f3409a485253c414bbac0.tar.bz2
Check for another tricky edge case
Diffstat (limited to 'tools')
-rw-r--r--tools/tclOOScript.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/tclOOScript.tcl b/tools/tclOOScript.tcl
index 12288e4..e10eda2 100644
--- a/tools/tclOOScript.tcl
+++ b/tools/tclOOScript.tcl
@@ -485,6 +485,11 @@
-errorcode {TCLOO PROPERTY_FORMAT} \
"bad property name \"$prop\"; must not begin with -"
}
+ if {$prop ne [list $prop]} {
+ return -code error -level 2 \
+ -errorcode {TCLOO PROPERTY_FORMAT} \
+ "bad property name \"$prop\"; must be a simple word"
+ }
set realprop [string cat "-" $prop]
set getter [format {::set [my varname %s]} $prop]
set setter [format {::set [my varname %s] $value} $prop]