Closed andrewemeryanz closed 4 years ago
View parameters and return types can not currently be optional:
App: !view Foo(bar <: string?) -> string? [~abstract]
Results in:
line 2:27 extraneous input '?' expecting CLOSE_PAREN line 2:39 extraneous input '?' expecting {ABSTRACT, COLON, SQ_OPEN}
Include optional attribute against the type:
param: { name: "bar" type: { primitive: STRING opt: true # new attribute } } ret_type: { primitive: STRING opt: true # new attribute }
Added comments on linked issue https://github.com/anzx/sysl/issues/158.
Purpose
View parameters and return types can not currently be optional:
Results in:
Suggested approaches
Include optional attribute against the type: