Orvid/Caprica

Comparison of strings not implemented

Opened this issue · 1 comments

The vanilla compiler can compare strings. It behaves like you would expect from any sensible language, returning the alphabetical order.
However, Caprica doesn't allow you to compile a script which attempts to compare two strings.

If you're comfortable with trying to fix it yourself you should take a look at: https://github.com/Orvid/Caprica/blob/master/Caprica/papyrus/expressions/PapyrusBinaryOpExpression.h#L164

Currently it coerces both operands to the same type and then throws an error if the left operand isn't an Int or a Float. The fix would be to split the magnitude comparison cases from the number-specific operator ones. The comparisons should be valid when both operands are strings or are numbers.