Stream: fhirpath
Topic: type check for =?
Paul Lynch (Sep 04 2018 at 17:06):
Unlike "6.2 Comparison", I don't see any requirement about the types matching for the operators in "6.1 Equality" (=, !=, ~, and !~). Must the types match for two items to be '=' ?
Grahame Grieve (Sep 04 2018 at 21:02):
tha
Grahame Grieve (Sep 04 2018 at 21:03):
that's tricky. I ignore type differences in primitives. otherwise they must match.
Grahame Grieve (Sep 04 2018 at 21:03):
I think
Bryn Rhodes (Sep 04 2018 at 21:07):
There is certainly the implication that the types must be the same, the spec says "otherwise, equals returns false".
Bryn Rhodes (Sep 04 2018 at 21:07):
Definitely worth a clarification though.
Paul Lynch (Sep 04 2018 at 22:24):
The "otherwise, returns false" follows a list of things that don't mention checking types. It mentions checking whether things are "equal", but JavaScript returns true for 1 == "1". So, if it was the intent that FHIRPath would return false in that case, yes, it would be very helpful to have that clarified. Should I open a GForge ticket?
Grahame Grieve (Sep 04 2018 at 22:59):
yes
Paul Lynch (Sep 05 2018 at 16:53):
Last updated: Apr 12 2022 at 19:14 UTC