mixin A def one as int return 1 def two as int is protected return 2 def three as int is private return 3 class B adds A def foo assert .one == 1 assert .two == 2 assert .three == 3 class P def main b = B() b.foo b.one b.two # .error. cannot access protected b.three # .error. cannot access private