Overview
| Artifact ID: | b56d29f3c5072c87951def4f841dd890dd36afa3f4acf90fddf8fadc482c3833 |
|---|---|
| Ticket: | 91b3a5bb14e6e8ae1d1c5349af12e08879ea152d
msgcat with oo: error "self may only be called from inside a method" |
| User & Date: | dkf on 2024-07-18 08:15:42 |
Changes
- icomment:
The shortcut of looking at the namespace name before doing the resolution is *technically* unsafe. There's an obscure (but documented!) feature to create objects with namespace names under the control of the user: the `createWithNamespace` method, which is not normally exported. (IIRC, Nathan wanted it and I didn't mind having it; TclOO works with namespace handles more than namespace names.) It's a shame that isn't in C as there's a much cheaper check if you can see the namespace implementation structure (literally check a flag bit). Anyway, your branch looks good to go to me as long as you bear in mind that's a formal incorrectness; I very much doubt that much user code will ever hit that particular wrinkle. Removing the shortcut (and measuring whether it actually saved anything) would fix that.
- login: "dkf"
- mimetype: "text/x-markdown"