Index: tests/info-method.test =================================================================== diff -u -r12897a57fba56be08ca8b94eb848c55e0539964c -rf64a1ac7fbc925042840dcac5eb6c2d42509b2f6 --- tests/info-method.test (.../info-method.test) (revision 12897a57fba56be08ca8b94eb848c55e0539964c) +++ tests/info-method.test (.../info-method.test) (revision f64a1ac7fbc925042840dcac5eb6c2d42509b2f6) @@ -547,11 +547,16 @@ ? {A info heritage} "::O ::nx::Object" ? {B info heritage} "::A ::O ::nx::Object" ? {M3 info heritage} "::B ::A ::O ::nx::Object" + A mixin M3 + ? {A info heritage} "::B ::M3 ::O ::nx::Object" ? {B info heritage} "::M3 ::A ::O ::nx::Object" - ? {M3 info heritage} "::B ::A ::O ::nx::Object" + M3 create m1 + ? {m1 info precedence} "::B ::A ::O ::M3 ::nx::Object" + ? {M3 info heritage} "::B ::A ::O ::nx::Object" + B mixin M3 ? {B info heritage} "::M3 ::A ::O ::nx::Object" } @@ -613,7 +618,34 @@ # PCM, therefore the classes mixed in by POMS are not at the front # of the list. # - ? {b1 info precedence} "::M3 ::M1 ::M4 ::M2 ::B ::A ::nx::Object" - #? {b1 info precedence} "::M1 ::M4 ::M3 ::M2 ::B ::A ::nx::Object" + puts stderr =====1 + #? {b1 info precedence} "::M3 ::M1 ::M4 ::M2 ::B ::A ::nx::Object" + + ? {b1 info precedence} "::M1 ::M4 ::M3 ::M2 ::B ::A ::nx::Object" + puts stderr =====2 } +# +# per-object mixin with implied classes +# +nx::Test case info-heritage-multimix { + Class create A + Class create B -superclass A + Class create C + Class create PCM -superclass A + C create c1 + + ? {c1 info precedence} "::C ::nx::Object" + + # ::A is an implied class + c1 mixin B + ? {c1 info precedence} "::B ::A ::C ::nx::Object" + + # ::A is as well implied by ::PCM + C mixin PCM + ? {C info heritage} "::PCM ::A ::nx::Object" + + # ::A is not ordered after ::B but after ::PCM + ? {c1 info precedence} "::B ::PCM ::A ::C ::nx::Object" + +} \ No newline at end of file