if ( entry.getValue() instanceof TypeDefinitionLink ) {
if ( !types.contains( ((TypeDefinitionLink) entry.getValue()).linkedType().id() ) ) {
types.add( ((TypeDefinitionLink) entry.getValue()).linkedType().id() );
jolieDocWriter.addLinkedType( (TypeDefinitionLink) entry.getValue() );
addSubTypes( ((TypeDefinitionLink) entry.getValue()).linkedType() );
<BUG>}
} else if ( entry.getValue() instanceof TypeInlineDefinition ) {
if ( entry.getValue().hasSubTypes() ) {
</BUG>
addSubTypes( entry.getValue() );

if ( entry.getValue() instanceof TypeDefinitionLink ) {
if ( !types.contains( ((TypeDefinitionLink) entry.getValue()).linkedType().id() ) ) {
types.add( ((TypeDefinitionLink) entry.getValue()).linkedType().id() );
jolieDocWriter.addLinkedType( (TypeDefinitionLink) entry.getValue() );
addSubTypes( ((TypeDefinitionLink) entry.getValue()).linkedType() );
