D 2019-03-15T14:18:16.341 J assignee nobody J closer nobody J cmimetype text/x-fossil-wiki J comment If\sframe\slevel\sis\sprovided\sas\svalue,\sit\sis\sconfused:\r\n\r\n%\sproc\stest\s{}\s{\sputs\spr:[info\sframe\s[info\sframe]];\snamespace\seval\s::test\s{puts\sns:[info\sframe\s[info\sframe]]}\s};\stest\r\n\s\spr:type\sproc\sline\s1\scmd\s{info\sframe\s[info\sframe]}\sproc\s::test\slevel\s0\r\n\s\sns:type\sproc\sline\s1\scmd\s{info\sframe\s[info\sframe]}\slevel\s0\r\n\r\ntotally\sunexpected\stype\s(red\smarked),\simho\s-\sshould\snot\stype\sbe\ssomething\slike\s"eval"\sor\s"namespace"\sin\sthe\ssecond\scase?\r\n\r\nIf\sone\sgives\sthe\s0\s(so\sas\scurrent\sframe\slevel),\sit\sworks\scorrect:\r\n\r\n%\sproc\stest\s{}\s{\sputs\spr:[info\sframe\s0];\snamespace\seval\s::test\s{puts\sns:[info\sframe\s0]}\s};\stest\r\n\s\spr:type\sproc\sline\s1\scmd\s{info\sframe\s0}\sproc\s::test\slevel\s0\r\n\s\sns:type\seval\sline\s1\scmd\s{info\sframe\s0}\slevel\s0\r\n\r\n\r\nBut\sstill\sworse,\sthe\sthings\schange\salso\sin\sthis\scase\sif\ssomething\selse\sis\sinvolved\saround\s`info\sframe`\sadditionally.
\r\nSo\sadding\sa\s`dict\sget\s...\stype`\saround\sconfuses\sit\sagain:\r\n\r\n%\sproc\stest\s{}\s{\sputs\spr:[dict\sget\s[info\sframe\s0]\stype];\snamespace\seval\s::test\s{puts\sns:[dict\sget\s[info\sframe\s0]\stype]}\s};\stest\r\n\s\spr:proc\r\n\s\sns:proc\r\n\r\nAs\swell\sas\sjust\susage\sof\sset,\sso\sset\sto\svariable\s(despite\sit\sis\scompiled\sin\sNS)\scauses\scompletely\swrong\stype\srecognition:\r\n\r\n%\sproc\stest\s{}\s{\snamespace\seval\s::test\s{puts\sns:[info\sframe\s0]}\s};\stest\r\n\s\sns:type\seval\sline\s1\scmd\s{info\sframe\s0}\slevel\s0\r\n%\sproc\stest\s{}\s{\snamespace\seval\s::test\s{puts\sns:[set\sf\s[info\sframe\s0]]}\s};\stest\r\n\s\sns:type\sproc\sline\s1\scmd\s{info\sframe\s0}\slevel\s0\r\n\r\n\r\nSo\sit\slooks\slike\s`info\sframe`\sis\stotally\sunusable\sat\sthe\smoment\s(or\sat\sleast\spointing\sat\sthe\swrong\sframe,\sif\sone\swants\sto\sretrieve\sthe\stype\sof\sthe\sscope). J foundin all J is_private 0 J login sebres J priority 5\sMedium J resolution None J severity Severe J status Open J submitter sebres J subsystem 16.\sCommands\sA-H J title info\sframe\sdoes\snot\scorrect\srecognize\scurrent\stype\sof\sexecution\sscope J type Bug K 2d2a32124406e8494a9d73cf2b668dcddc75fdf6 U sebres Z c76c5e236f05012e262c91ba81bf0e15