Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006534 [Squeak] Traits minor always 06-09-07 12:17 06-14-07 07:02
Reporter Damien Cassou View Status public  
Assigned To dvf
Priority normal Resolution open  
Status assigned   Product Version 3.9
Summary 0006534: Trait required methods take precedence over super class implementation
Description T1>>f
   self explicitRequirement

A is a subclass of Object, NOT using T1

A>>f
   self doSomething

B is a subclass of A using T1

In B, f is still a requirement even if implemented in the superclass. This is because methods in trait T1 take precedence over methods in the superclass. This should not be the case with required methods.
Additional Information
Attached Files

- Relationships

- Notes
(0010788 - 350 - 350 - 350 - 350 - 350 - 350)
dvf
06-09-07 15:02

I disagree this is a bug. Trait methods are defined to be considered as belonging to the class using them, therefore they override inherited classes. The conclusion is that having explicit requirements is a bad idea. This is reinforced by the existence of an incremental browser that detects requirements automatically, without them being declared...
 
(0010813 - 355 - 383 - 383 - 383 - 383 - 383)
black
06-14-07 07:02

"self explicitRequirement" is a representation of what the Traits formal model calls bottom. Bottom meet X = X for all X. So in this case, B >> #f should be self doSomething.

What is most likely going on here is that the implementation is (1) using a real method for self explicitRequirment, and (2) failing to check for it when composing the trait.
 

- Issue History
Date Modified Username Field Change
06-09-07 12:17 Damien Cassou New Issue
06-09-07 12:17 Damien Cassou Status new => assigned
06-09-07 12:17 Damien Cassou Assigned To  => dvf
06-09-07 15:02 dvf Note Added: 0010788
06-14-07 07:02 black Note Added: 0010813


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
39 total queries executed.
32 unique queries executed.
Powered by Mantis Bugtracker