/* internal class Example>(protected val x : Foo, y : Some) : Bar(x), Foo by x, IAbstractSome by y.asAbstract() where T : Function { // members } */ class : modifiers "class" SimpleName typeParameters? ("wraps" valueParameters? | modifiers valueParameters?)? (":" attributes delegationSpecifier{","})? (classBody? | enumClassBody) ; typeParameters : "<" typeParameter{","} ">" ("where" typeConstraint{","})? ; classBody : ("{" memberDeclaration "}")? ; delegationSpecifier : constructorInvocation // type and constructor arguments : explicitDelegation ; explicitDelegation : userType "by" expression // internal this expression no foo {bar} is allowed ; typeParameter : modifiers SimpleName (":" userType)? ; typeConstraint : attributes SimpleName ":" type : attributes "class" "object" SimpleName ":" type ;