I think I have encountered an error message that is not necessarily valid or helpful. If it is valid, please tell me what the mistake I encounter is triggered by.
You do not follows UML notation and you exchanged the parameter and its type, your operations must be
create(entity : E) : Result<E>
create(entities : iterable<E>) : ResultCollection<E>
Your create(E : entity) : Result<E>
was accepted 'syntactically' because the var can be E and its type entity, but in the second case the var name iterable<E>
is illegal and the tool refuses that.
From formal/2017-12-05 §9.6.4 page 117 and 118 :
If shown in a diagram, an Operation is shown as a text string of the form:
[<visibility>] <name> ‘(‘ [<parameter-list>] ‘)’
[‘:’ [<return-type>] [‘[‘ <multiplicity-range> ‘]’]
[‘{‘ <oper-property> [‘,’ <oper-property>]* ‘}’]]
and
<parameter-list>
is a list of Parameters of the Operation in the following format:
<parameter-list> ::= <parameter> [‘,’<parameter>]*
and § 9.4.4 page 110 :
<parameter> ::= [<direction>] <parameter-name> ’:’ <type-expression>
[’[’<multiplicity-range>’]’] [’=’ <default>]
[’{’ <parm-property> [’,’ <parm-property>]* ’}’]
So it must be <parameter-name> ’:’ <type-expression>
rather than <type-expression> ’:’ <parameter-name>
as you did