Static Types in C3

#1

Can we create a static type in C3? I want to create a type which cannot be inherited (mixed /extended)

entity type MyType mixes SomeType schema name ‘MYTYP’

entity type OtherType mixes MyType schema name ‘OTHRTYP’ – This shouldn’t be allowed.

0 Likes

#2

You cannot forbid a type from mixing yours. However you can forbid other types from extending your own by not using the extendable keyword on your type. In other words, if you have:

entity type MyType mixes SomeType schema name ‘MYTYP’

This will work:

entity type OtherType mixes MyType schema name ‘OTHRTYP’

But this will not:

entity type OtherType extends MyType type key 'OTHRTYP'
0 Likes