Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 42c09b3d65370c8f2f4de45d667bc74b9f518fe4
Ticket: 2712377fffffffffffffffffffffffffffffffff
info vars doesn't show object variables correctly
User & Date: cnassau on 2009-03-27 02:36:31
Changes

  1. icomment:
    Here's another script that behaves strangely with respect to object variables:
    
        oo::class create test {
    variable foo
    
    constructor {foo} {
        set bar $foo
        unset foo
        my variable foo
        set foo $bar
    }
    
    method dump {} {
        puts foo=$foo
    }
        }
    
        test create FOO BAR
        FOO dump
    
    Here "unset foo" fails with "can't unset "foo": no such variable". If that line is commented out the error becomes "variable "foo" already exists" from "my variable foo". I would have hoped that "FOO dump" produces "foo=BAR" in the end.
    
    Again this report refers to CVS head (which identifies itself as 8.6b1.1 with TclOO 0.6.1).
    
    
    
    
    
  2. login: "cnassau"
  3. mimetype: "text/plain"
  4. username: "cnassau"