If a duplicate method is defined using the "method" command, the error message is clear, for example:
package require Itcl
itcl::class C {
method m {} {}
method m {} {}
}
Output:
"m" already defined in class "::C"
However, if the second definition uses "public", "private", or "protected", the error mesage is less clear:
package require Itcl
itcl::class C {
method m {} {}
public method m {} {}
}
Output:
wrong # args: should be "public command ?arg arg...? or wrong command name"
This makes debugging more difficult. Please change the "public", "private", and "protected" error messages to match the "method" error message. Duplicate class procedures behave the same way. The error messages in Itcl 3.4 were correct.