Skip to content
Browse files

oo: aliases are now commands, not procs

So fix oo.tcl when falling back to base class methods

Signed-off-by: Steve Bennett <>
  • Loading branch information...
1 parent 535ce8f commit 73d257c2f0389f860d7f8fe826feee89f56dfbbb @msteveb committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 oo.tcl
4 oo.tcl
@@ -28,7 +28,7 @@ proc class {classname {baseclasses {}} classvars} {
# It simply dispatches 'classname cmd' to a procedure named {classname cmd}
# with a nice message if the class procedure doesn't exist
proc $classname {{cmd new} args} classname {
- if {![exists -proc "$classname $cmd"]} {
+ if {![exists -command "$classname $cmd"]} {
return -code error "$classname, unknown command \"$cmd\": should be [join [$classname methods] ", "]"
tailcall "$classname $cmd" {*}$args
@@ -42,7 +42,7 @@ proc class {classname {baseclasses {}} classvars} {
# Store the classname in both the ref value and tag, for debugging
# ref tag (for debugging)
proc [ref $classname $classname "$classname finalize"] {method args} {classname instvars} {
- if {![exists -proc "$classname $method"]} {
+ if {![exists -command "$classname $method"]} {
return -code error "$classname, unknown method \"$method\": should be [join [$classname methods] ", "]"
"$classname $method" {*}$args

0 comments on commit 73d257c

Please sign in to comment.
Something went wrong with that request. Please try again.