Tcl Source Code

View Ticket
Login
Ticket UUID: 319573f89fc745ad61df3b5d43b7145796c1c8a3
Title: namespace ensemble created over TclOO object results in disappearing namespace
Type: Bug Version: trunk
Submitter: pooryorick Created on: 2017-07-04 12:42:08
Subsystem: 35. TclOO Package Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2018-01-01 17:34:41
Resolution: Rejected Closed By: pooryorick
    Closed on: 2018-01-01 17:34:41
Description:

creating a namespace ensemble over a TclOO object associated with the namespace causes the namespace to disappear:

namespace eval [info object namespace ::oo::object] [
    list my createWithNamespace ::obj1 ::obj1
]

namespace eval ::obj1 {
    namespace ensemble create
}

namespace parent ::obj1 ;# -> namespace "::obj1" not found

User Comments: aspect added on 2017-07-05 13:05:16:
in the example, [namespace ensemble create] destroys the object to replace it with the ensemble command.  The object takes the namespace with it.