diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2020-01-01 16:01:36 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2020-01-01 16:01:36 (GMT) |
commit | b308bd97e6cdee90b11f3409a485253c414bbac0 (patch) | |
tree | 0294f25c5f1f534e2aadf23783cc8d87d2783a6b /tools | |
parent | ae24dd87fa424c374fc25dd2495ca5a5c874af95 (diff) | |
download | tcl-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.tcl | 5 |
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] |