Itcl - the [incr Tcl] extension

Ticket Change Details
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Aug 20.
Overview

Artifact ID: bc1b7d8b43d1821bf759bf9dc39c441e5364acd6387aedf9c9727597c1c64027
Ticket: 15f7db53b9f36d978ce732685ac868ee06fbb216
Different behavior for Itcl 4 and Itcl 3
User & Date: anonymous 2018-03-17 20:52:42
Changes

  1. Change foundin to "4.1.1"
  2. Change icomment to:

    Hi! Appears that the following code behaves differently in Itcl 3 and 4:

    itcl::class a { constructor {args} {} public method a {} }

    itcl::body a::constructor {args} { puts "a::constructor $args" b ::newb }

    itcl::body a::a {} { puts "a::a" }

    itcl::class b { constructor {args} {} }

    itcl::body b::constructor {args} { puts "b::constructor $args" a::a }

    a newa

    (it's a minimal example which reproduces the problem). Specifically, in Itcl 3 the code works fine and prints

    a::constructor b::constructor a::a

    but in Itcl 4 it emits the error:

    a::constructor b::constructor bad option "a": should be one of... newb cget -option newb configure ?-option? ?value -option value...? newb isa className while executing "a::a" while constructing object "::newb" in ::b::constructor (body line 4) invoked from within "::itcl::parser::handleClass b ::b ::newb" invoked from within "b ::newb" while constructing object "::newa" in ::a::constructor (body line 4) invoked from within "::itcl::parser::handleClass a ::a newa" invoked from within "a newa" (file "test.tcl" line 28)

    For some reason a::a tries to find method a in class b and fails.

  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-plain"
  5. Change private_contact to "07bcf89c4057d2d0e00473ab972eef3274af2d93"
  6. Change severity to "Important"
  7. Change status to "Open"
  8. Change title to "Different behavior for Itcl 4 and Itcl 3"
  9. Change type to "Code_Defect"