On Thu, 27 Jan 2011, Henrik Sperre Johansen wrote:
On 27.01.2011 19:53, Levente Uzonyi wrote:
On Thu, 27 Jan 2011, pharo@googlecode.com wrote:
Status: Accepted Owner: ryd...@gmail.com CC: romain.r...@gmail.com Labels: Milestone-1.2-DevImage Milestone-1.3-DevImage OCompletion
New issue 3603 by ryd...@gmail.com: O/ECompletion failure in Trait methods http://code.google.com/p/pharo/issues/detail?id=3603
A debugger pops up when typing in after super in a trait method, since traits do not implement superclass.
The bug is not related to OCompletion. Traits implement (via TPureBehavior) #allSuperclasses, #withAllSuperclasses, etc., but lack #superclass. So which implementation of #superclass would you recommend for Trait, which would keep O/ECompletion working without modification? I can't think of any which makes sense really.
nil is a possiblity or remove the super- and subclass related methods, see below.
IMO, if code in the component eventually needs to be changed to not raise a debugger, it's related.
We could ignore the errors, but hiding bugs is a bad idea IMHO. We can add a check too, but what can you say about the following anomalies in the trait implementation? | justATrait | justATrait := TPureBehavior. justATrait isTrait. "true ok" justATrait isBehavior. "false strange" justATrait allSuperclasses. "an OrderedCollection() ok if there should be none" justATrait withAllSuperclasses. "an OrderedCollection(TPureBehavior) ok, but the comment says it should contain Object too" justATrait subclasses. " #() acceptable" justATrait superclass. "Error WTF?" Btw, what happened to the clipboard in Pharo 1.2 on windows? If I copy text, the line endings are CRs, not CRLFs, so the text is a single line. Levente