Overview
| Artifact ID: | 437fb36327f6b006bf2b49b24d997ecaa5ad5257e36e3345219727b7f725d218 |
|---|---|
| Ticket: | 0439e1e1a37ff9c634280bc2490981f3e3c7e985
Slow detection of illegal expr argument |
| User & Date: | jan.nijtmans on 2024-07-07 14:10:12 |
Changes
- icomment:
I think [2290847d23a494e4|this] is how it should be: If the obj being handled by "expr" can be represented as a list and has more than 1 element (so a dict as well), it now gives a slightly different error-message: <pre> % set x [lseq 1 11111111111111];set y 5 5 % expr {$x+$y} can't use a list as operand of "+" </pre> A side-effect of this is that Tcl_GetNumberFromObj() now tries to convert the object to a list, if it isn't already one of the other known types (like dict, lseq, or index). That's very useful in further error-handling, since the typePtr or lengthProc then can be inspected for this case without trying to do more parsing. It might also be very useful for the implementation of a future Tcl_GetValueFromObj() .... - login: "jan.nijtmans"
- mimetype: "text/plain"