pathling
pathling copied to clipboard
Implement String concatenation with + operator incorrect
String concatenation with + operator produces incorrect result (the value of the first argument).
(Math 6 exlusions)
Details
Expected: null but got: c ==> expected: <null> but was: <c>
'c' + Patient.name.given[0] [** Null in concatenation is treated as an empty collection (2)]
Expected: onetwo but got: one ==> expected: <onetwo> but was: <one>
s5 + s6 [** Can concatenate two strings with +]
(FHIR R4 Exlclusions) Details
Expected: true but got: false ==> expected: <true> but was: <false>
'a'+'b' = 'ab' [** testPlus4]
We don't actually support this, so the task is to either:
- Make it impossible
- Implement it properly as a new feature
Changed to be a new feature as not implemented in previous versions.
We need to make a decision on what data types we are going to support for the math and comparison operators.
At the moment this doesn't seem to work at all for strings.
The current error message is au.csiro.pathling.errors.InvalidUserInputError: + operator does not support left operand: ??, which indicates a bug or incomplete implementation.