Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3fcad87dedde483450eb3acce0f471acc36d6e8962b2d27dfe7b4e6148f37213
Ticket: 794298036fda15d18e9ee7251bb948dabe8fd498
oo::class appears to confiscate the 'create' method on all its descendants.
User & Date: anonymous on 2018-06-02 07:14:33
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    oo::class 'create' is a method.
    
    If I derive an instance of oo::class which contains a method 'create', I cannot call its create method.
    
    The following snipped should error, but does not, because Class's create method is intercepted by oo::class.  This is a bug.  One should reasonably expect to be able to override methods, and this appears to be true for other methods which one might define (in the example below) on Class.
    
    Colin.
    
    Demonstration:  I would expect Class 'create' to be called, but it is not.
    
    oo::class create Class {
        method create {args} {
    	error "Should Error, but doesn't - this is a bug, it means no oo::class instance can override create method"
        }
    }
    Class create Instance
    
    oo::class create MClass {
        superclass ::oo::class
        method create {args} {
    	error "Should Error, but doesn't - this is a bug, it means no oo::class instance can override create method"
        }
    }
    MClass create MInstance
    
  5. is_private changed to: "0"
  6. login: "anonymous"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "16910d69b11045755316a073070779a85cd9218f"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "anonymous"
  13. subsystem changed to: "35. TclOO Package"
  14. title changed to:
    oo::class appears to confiscate the 'create' method on all its descendants.
    
  15. type changed to: "Bug"