.
D 2006-08-25T18:52:11
J assignee msofer
J cmimetype text/plain
J comment Will\sDuquette\sreports\sby\smail\sthat\svarname\sresolution\nof\s[namespace\supvar]\sis\sfailing\sto\sdo\sthe\sright\sthing\nin\sthe\s(non-fully)\squalified\scase.\s\n\n<quote>\nPlease\sconsider\sthe\scode:\n\n\s\snamespace\seval\s::cat::\s{\s}\n\n\s\snamespace\seval\sdog::\s{\n\s\s\s\s\s\sset\sdogInfo(a)\s"A"\n\s\s\s\s\s\sset\sdogInfo(b)\s"B"\n\s\s}\n\n\s\sproc\s::cat::TestProc\s{type}\s{\n\s\s\s\s\s\sif\s{![info\sexists\s${type}::dogInfo]}\s{\n\s\s\s\s\s\s\s\s\s\serror\s"no\ssuch\stype:\s\\"$type\\""\n\s\s\s\s\s\s}\n\n\s\s\s\s\s\supvar\s${type}::dogInfo\sdogInfo1\n\s\s\s\s\s\sparray\sdogInfo1\n\n\s\s\s\s\s\snamespace\supvar\s$type\sdogInfo\sdogInfo2\n\n\s\s\s\s\s\sparray\sdogInfo2\n\s\s}\n\n\s\s::cat::TestProc\sdog\n\nWhat\shappens\swhen\sI\srun\sthis\sis\sit\sprints\sthe\scontent\nof\sdogInfo1,\sbut\sthen\ssays\sthere\sis\sno\sarray\sdogInfo2;\n[namespace\supvar]\sis\sfailing\sto\salias\sdogInfo2\sto\n::dog::dogInfo.\n\nNow,\sthe\sbehavior\sof\s[namespace\supvar]\sdoesn't\ssurprise\nme;\ssince\sTestProc\sis\sin\s::cat::,\s[namespace\supvar]\sis\npresumably\strying\sto\salias\sdogInfo2\sto\n::cat::dog::dogInfo.\s\sThat\smakes\ssense\sto\sme.\n\n[info\sexists]\sand\s[upvar],\son\sthe\sother\shand,\sare\nfinding\s::dog::dogInfo;\sthis\ssurprises\sme.\s\sDo\slookups\nof\spartially-qualified\svariable\snames\sfall\sback\sto\s::\nif\sthe\svariable\sisn't\sfound\sin\sthe\scurrent\snamespace?\s\nIf\sso,\s[namespace\supvar]\sshould\sundoubtedly\sdo\sthe\ssame\nthing.\s\sI\smust\ssay,\sI\swasn't\sexpecting\sthem\sto\sdo\sthat,\nthough.\n</quote>\n\n
J foundin obsolete:\s8.5a5
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter msofer
J subsystem 21.\s[namespace]
J title wrong\svarname\sresolution\sin\s[namespace\supvar]
J type Bug
K 1546833fffffffffffffffffffffffffffffffff
U msofer
Z 7e8a0e7b187b94610a4b5699aea2c71a