Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: eb09e2ab6e655b0002f3b8a1646df3e7bfec7392
Ticket: 3588176fffffffffffffffffffffffffffffffff
variable already exists (variable is a filesystem path)
User & Date: ferrieux on 2012-11-17 23:12:25
Changes

  1. icomment:
    Here's a much smaller case:
    
     % proc f {} {set item 1;g}
     % proc g {} {uplevel {variable item 2}}
     % f
     variable "item" already exists
    
    It is collision between a local and an attempt to define a new namespace variable with the same name.
    You can even trigger it without uplevelling:
    
     % proc h {} {set item 1;variable item 2}
     % h
     variable "item" already exists
    
    I dunno whether Tcl should be blamed for that. As a programmer, I can't imagine a case where this wouldn't actually detect a PBKAC ;)
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"