On Sep 18, 2008, at 5:15 PM, Adrian Lienhard wrote:
On Sep 18, 2008, at 16:36 , Stéphane Ducasse wrote:
About traits I was thinking to implement the protocol we designed at ESUG.
what's that?
I would like to define some tests also to cover that CM are really duplicated.
btw., I'm in the process of making http://code.google.com/p/pharo/issues/detail?id=167 work correctly...
why It was broken?
that is, I'm looking forward for your test ;)
Yes I should really write something.... (fixig again the floor). I hope to get done after the week end. something like... ============================================= A method belong to a trait or a class. how do we query such belonging. T1 c Class A foo uses: T1 + alias T1>>c = c2 (A>>c2) selector -> c2 (A>>c) selector -> c (T>>c) selector -> c (A>>foo) class -> A (A>>c2) class -> A (A>>c) class -> A ***(T1>>c) class -> nil or T1 ? ** (A>>foo) trait -> nil (T1>>c2) trait -> Exception (T1>>c) trait -> T1 (A>>c) trait -> T1 ============================================= T1 c Class A foo uses: T1 + alias T1>>c = c2 Class B uses: T1 (A>>c2) selector -> c2 (A>>c) selector -> c (B>>c) selector -> c (T>>c) selector -> c (A>>foo) class -> A (A>>c2) class -> A (A>>c) class -> A (B>>c) class -> B (A>>foo) trait -> nil (T1>>c2) trait -> Exception (T1>>c) trait -> T1 (B>>c) trait -> T1 (A>>c) trait -> T1 ============================================= T1 c c1 T2 c c2 uses: T1 Class A foo uses: T2 (A>>c2) selector -> c2 (A>>c) selector -> c (T2>>c) selector -> c (T1>>c) selector -> c (A>>foo) class -> A (A>>c2) class -> A (A>>c) class -> A (A>>c1) class -> A (T1>>c1) class -> ???? T1 or nil (T2>>c1) (T2>>c2) class -> ???? T2 or nil (A>>foo) trait -> nil (A>>c2) trait -> T2 (A>>c) trait -> T2 (A>>c1) trait -> T2 ***** since it is flat (T1>>c1) trait -> ???? T1 or nil (T2>>c1) trait (T2>>c2) trait -> ???? T2 or nil origin = definingClassOrTrait (A>>foo) origin -> A (A>>c2) origin -> T2 (A>>c1) origin -> T1 (A>>c) origin -> T2 ***** (T1>>c) origin -> T1 (T1>>c1) origin -> T1 The origin is the method that you changed (and not override) when you want to change a method in the flat view.