|Anonymous | Login||09-17-2021 05:09 UTC|
|Main | My View | View Issues | Change Log | Docs|
|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|
|Summary||0006534: Trait required methods take precedence over super class implementation|
A is a subclass of Object, NOT using T1
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.
(0010788 - 350 - 350 - 350 - 350 - 350 - 350)
|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)
"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.
|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.