BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2024-08-04

class X::Mixin::NotComposable

Error due to using an ineligible type as a mixin

class X::Mixin::NotComposable is Exception { }
Code

Thrown when a mixin with infix does or but is done with a composer that cannot be used for mixin.

For example

class B { };
1 but B;
CATCH { default { put .^name, ': ', .Str } };
# OUTPUT: «X::Mixin::NotComposable: Cannot mix in non-composable type B into object of type Int␤»
Code

The compile-time equivalent of this error is X::Composition::NotComposable.

Methods§

method target§

method target()
Code

Returns the target of the failed mixin operation.

method rolish§

method rolish()
Code

Returns the thing that could not act as a role for mixing it in