firely-cql-sdk
firely-cql-sdk copied to clipboard
Consider allowing a function return type to be compatible to the body's type.
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.