Tcl Source Code

View Ticket
Login
Ticket UUID: e86e178aff221cef6106ac775a38f2f18f5cadee
Title: namespace deletion: trace that calls [apply], specifying the namespace, doesn't fire.
Type: Bug Created on: 2018-01-19 20:43:47
Submitter: pooryorick Assigned to: nobody
Subsystem: 21. [namespace] Severity: Minor
Priority: 5 Medium Last modified: 2018-01-19 20:43:47
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: trunk
Description:

In the following example, the trace does not occur:

namespace eval ns1 {
    proc p1 {} {}
    trace add command p1 delete [list ::apply [list args {
        puts hello
    } [namespace current]]]
    namespace delete [namespace current]
}

The problem is that in prepration to invoke apply, the namespace is looked up by name, but this fails for namespaces that are dying, causing TclNRApplyObjCmd to fail.

Fixed in the bug-e593adf103-core-8 branch.