Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: efd9aa32c2cf813fff60ce0ee638c1e9b84590b07eeef6ea0914310a3fabb755
Ticket: 36e5517a6850c19300547700954912678fd46703
Incompatible change in behavior of -private option to info class methods command
User & Date: apnadkarni on 2024-05-03 06:50:25
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    In 8.6
    
    ```
    % oo::class create C {method Private {} {}; method public {} {}}
    ::C
    % info class methods ::C
    public
    % info class methods ::C -private
    public Private
    ```
    
    The above works as documented as the `-private` option will return private methods **in addition to** public methods as stated in the manpage *If the -private flag is given, the list of methods will also include the private...* (note the "also").
    
    In Tcl 9, this is not the case
    
    ```
    % oo::class create C {method Private {} {}; method public {} {}}
    ::C
    % info class methods ::C
    public
    % info class methods ::C -private
    Private
    ```
    
    Note the `-private` option now returns only private methods. However, the documentation still seems to match 8.6 behavior: *If the -private flag is given, and the -scope flag is not given, the list of methods will also include the non-exported methods of the class*
    
    I'm not sure if the Tcl 9 implementation needs to be fixed or the documentation. If the latter, an Tcl 8 incompatibility note would be desirable.
    
  5. foundin changed to: "9.0b2"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "35. TclOO Package"
  15. title changed to:
    Incompatible change in behavior of -private option to info class methods command
    
  16. type changed to: "Bug"