We're updating the issue view to help you get more done. 

Provide a more strongly typed API for creating additional types

Description

Currently the user creates all kind of new types through TypeContext.CreateType which returns a {MutableType}.
This is not optimal as the user cannot use most of the APIs (for example: interfaces cannot have fields, enums cannot implement interfaces...).
In addition the 'MutableType' (which is really inteded to be a 'MutableClass') was changed to allow null base types (which is necessary because interfaces do not have a base type).

Therefore provide a more strongly typed API:
TypeContext.CreateInterfaceType: MutableInterfaceType
TypeContext.CreateEnumType: MutableEnumType
etc...

Implementations notes:
Add Assertions.IsNotNull(BaseType) to MutableType .ctor, GetAll*** methods, etc.. and refactor it to the previous state (where it did not support interfaces).

Assignee

Unassigned

Reporter

User known

Labels

None

Components

Fix versions

Priority

Normal
Configure