firely-cql-sdk icon indicating copy to clipboard operation
firely-cql-sdk copied to clipboard

Consider allowing a function return type to be compatible to the body's type.

Open ewoutkramer opened this issue 1 year ago • 0 comments

Although in many places CQL allows substitutability of types, this is not the case for return types of functions and their bodies. E.g.

define function x() returns Decimal: 4

is not allowed, only strict subtyping:

define function y() returns DomainResource: Patient { ... }

Given the flexibility in other places of the CQL language, we think the first case should be allowed too.

ewoutkramer avatar Nov 13 '23 16:11 ewoutkramer