Tcl Source Code

View Ticket
Login
Ticket UUID: b721292488d3c6e57db88cd5f59be297140229be
Title: name resolution not working or works differently in trunk
Type: Bug Version: trunk
Submitter: bll Created on: 2020-09-21 07:03:54
Subsystem: - New Builtin Commands Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2020-09-21 17:08:15
Resolution: Invalid Closed By: bll
    Closed on: 2020-09-21 17:08:15
Description:
The following works in 8.6.10 and core-8-6-branch, but not in trunk:
(also attached)


namespace eval sysvars {
  variable v

  proc init { } {
    variable v

    set v(works) true
  }
}

::sysvars::init

namespace eval themeloader {
  proc load { } {
    puts "A: $::sysvars::v(works)"
    puts "B: $sysvars::v(works)"
  }
}

::themeloader::load
User Comments: bll added on 2020-09-21 17:08:15:
Ok.  I was fortunate in that I had fixed all of my references (for readability),
at an earlier date, and happened to miss one file.

This tip 278 has the potential to break a lot of programs.

I hope that the referenced tip 277 does not get accepted, it's scary.

dgp added on 2020-09-21 14:25:39:
See TIP 278.

Attachments: