Menu

#25 Unknown commands in namespace ending in ::

1.0
accepted
None
Bug
2019-06-24
2019-05-29
Pizarro
No

If you add "::" at the end of the name of your namespace, although TCL accepts as correct code,
nagelfar does not.

i.e. it does not appear to figure out that the commands in the namespace exist

example

namespace eval ::MySpace:: {
    proc myCmd { args } { puts hi }

    proc cmd2 { args } { ::MySpace::myCmd someargs }
}

# This line works, correcly printing out "hi"
::MySpace::cmd2 something

With nagelfar correctly processing the code if the first line is changed to:

namespace eval ::MySpace {
}

I think that the fix might be to trim any trailing "::" from the namespace name, with the rest of its processing unchanged.

Discussion

  • Peter Spjuth

    Peter Spjuth - 2019-06-24
    • status: open --> accepted
    • assigned_to: Peter Spjuth
     
  • Peter Spjuth

    Peter Spjuth - 2019-06-24

    Why not just not have those extra :: in the code?
    In my opinion that is unusual code and should get a reaction.

     

Log in to post a comment.

MongoDB Logo MongoDB