Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2190cee6237db3cf9a37c2fdfa0deaa44ae46f00
Ticket: fbc88fb645c5b2f47f16cd0e167ef47de081f212
[variable] doesn't follow variable resolution rules
User & Date: sebres on 2017-05-31 06:57:35
Changes

  1. closedate changed to: "2457904.78999284"
  2. closer changed to: "sebres"
  3. icomment:
    You are wrong with your assessment: in your error-case the variable is not fully qualified (thus relative current namespace), so it references "::foo::a::a" which is indeed not available.
    
    Either you want to reference "::foo::a::a" (then you should create this var):
    <code><pre>
    % namespace eval foo {namespace eval a {set a "a in [namespace current]"}; proc bar {} {variable a::a; puts $a}}
    % foo::bar
    a in ::foo::a
    </pre></code>
    Rather you want to reference "::a::a" (then you should write it full-qualified):
    <code><pre>
    % namespace eval foo {proc bar {} {variable ::a::a; puts $a}}
    % foo::bar
    a in ::a
    </pre></code>
    Thus closed as invalid.
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"