Artifacts Associated With Ticket 1574835
Ticket change [0886e655fd] (rid 89575) by dkf on 2006-10-10 21:35:17:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% namespace ensemble create -command bar -map {id {const foo}} ::bar % proc const val { return $val } % proc alias {object slot = command args} { set map [namespace ensemble configure $object -map] dict set map $slot [linsert $args 0 $command] namespace ensemble configure $object -map $map } % proc method {object name params body} { set params [linsert $params 0 self] alias $object $name = ::apply [list $params $body ::] $object } % method bar boo x {return "[expr {$x*$x}] - $self"} % bar ? unknown or ambiguous subcommand "?": must be boo, or id % bar boo wrong # args: should be "bar boo" That's a wrong error message, should be: wrong # args: should be "bar boo x" - foundin initialized to: "obsolete: 8.5a5"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dkf"
- subsystem initialized to: "22. [proc] and [uplevel]"
- title initialized to: "wrong#args problem in [apply] guts"
- type initialized to: "Bug"
Ticket change [3dd07af3f5] (rid 121161) by msofer on 2006-10-11 05:34:02:
- icomment:
Logged In: YES user_id=148712 Oohh ... nasty, the error messages for curried lambdas are not quite ok. % set lam [list {self x} {return "[expr {$x*$x}] - $self"}] {self x} {return "[expr {$x*$x}] - $self"} % apply $lam bar wrong # args: should be "apply {{self x} {return "[expr {$x*$x}] - $self"}} self x" % interp alias {} try {} apply $lam bar try % try wrong # args: should be "apply {{self x} {return "[expr {$x*$x}] - $self"}} self x" That should be instead: wrong # args: should be "try x" Or should it? % interp alias {} try2 {} boo bar try2 % try2 wrong # args: should be "boo self x" [Side note: should interp alias rewrite the error message ust like ensemble aliases? Probably ...] There is here (I think) some interplay between ::apply returning such a funny error message (with a two-word command name, plenty of spaces in there too) and the ensemble's rewriting rules. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [c5f9e2b5cd] (rid 121684) by msofer on 2006-10-11 05:35:30:
- priority changed to: "8"
Ticket change [f1205302b3] (rid 109309) by msofer on 2006-10-12 08:39:11:
- icomment:
File Added - 197791: 1574835.diff Logged In: YES user_id=148712 Attached a patch that fixes this particular issue, but raises some others. It uses ns-ensemble's machinery. New test failures: apply-4.1,2: Tcl_WrongNumArgs is quoting where it shouldn't. ---- Result was: 1 {wrong # args: should be "apply {{x {set x 1}}} x"} ---- Result should have been (exact matching): 1 {wrong # args: should be "apply {x {set x 1}} x"} Apply-6.2,3: [info level] does not know about ensemble rewriting. I think it should. set lambda [list args {info level 0}] apply $lambda x y ---- Result was: {args {info level 0}} x y ---- Result should have been (exact matching): apply {args {info level 0}} x y - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "1574835.diff" [1752a0a713] (rid 122470) by msofer on 2006-10-12 08:39:11.
Ticket change [05973245a2] (rid 89090) by msofer on 2006-10-12 08:44:20:
- icomment:
Logged In: YES user_id=148712 To illustrate that the problem is at least partially with [info level]: % proc foo {} {info level 0} % alias bar boo = foo % bar boo ::foo - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [5feb3f5dbd] (rid 115904) by dgp on 2006-10-12 21:03:35:
- icomment:
Logged In: YES user_id=80530 Looks like you're re-opening the issues from 217806, 218638, 218015. The *really* important issue in those reports got corrected, but the incompat in [info level] data remained.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [83c8a9725e] (rid 117438) by msofer on 2006-10-15 10:03:44:
- icomment:
Logged In: YES user_id=148712 See also [Bug 1577492] for a solution to the [info level] problem.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [dc50777502] (rid 114457) by msofer on 2006-10-24 05:53:52:
- icomment:
Logged In: YES user_id=148712 Patch in [Bug 1577492] has been committed, this patch should be adapted so that [interp alias] benefits too.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [6aadb8562c] (rid 128198) by msofer on 2006-10-24 07:37:15:
- icomment:
Logged In: YES user_id=148712 Fixed in HEAD, tests missing.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d7e7ad76c4] (rid 107347) by msofer on 2006-10-24 07:37:16:
- resolution changed to: "Fixed"
Ticket change [8f17fef016] (rid 120224) by msofer on 2006-10-25 06:13:09:
- closedate changed to: "2006-10-24T23:13:09"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Added apply-4.3-5
- login: "msofer"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "msofer"