class A fun foo() { trait Z: A {} fun bar() { class O2: Z {} } }