Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6160801c8632290363b6a0f5d61c21e164cfaec8
Ticket: 835020ffffffffffffffffffffffffffffffffff
lassign to member variables in itcl methods
User & Date: pbiereic on 2003-11-03 13:29:51
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl version: 8.4.3
    OS platform: Redhat 9, Solaris 2.8, SuSE 8, HP-UX 11
    
    Problem behaviour: "lassign" does not store the value
      of the member variable x in method "store" (see
      sample code).
      Running the sample code will print "0" on 8.4.3
      and "2" on previous versions.
      If the member variable x is referenced (e.g. with
      "set a $x" then 8.4.3 will print the correct value.
    
    Expected Behavior: as for previous tcl (tclx) versions
      
    Concise Code Sample:
    
    package require Tclx
    package require Itcl
    
    itcl::class T {
        protected variable x 0
    
        constructor {args} {
    store
    print
        }
        protected method store {} {
    lassign 2 x
                 # set a $x
        }
        protected method print {} {
    puts $x
        }
    }
    
    T t
    
    
  4. foundin changed to: "obsolete: 8.4.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "pbiereic"
  9. subsystem changed to: "07. Variables"
  10. title changed to: "lassign to member variables in itcl methods"
  11. type changed to: "Bug"