Permalink
Browse files

Merge pull request #2095 from tbabej/test_fixes

TW-1511: Interpret string subtraction as concanetation with a dash
  • Loading branch information...
pbeckingham committed Jan 2, 2019
2 parents 01696a3 + bf2cd0f commit 660b7c09af4e705020a2460ed4ed6ae976d8566a
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/Variant.cpp
@@ -1278,7 +1278,18 @@ Variant& Variant::operator-= (const Variant& other)
break;

case type_string:
throw std::string (STRING_VARIANT_SUB_STRING);
switch (right._type)
{
case type_string:
cast (type_string); _string += '-' + right._string; break;
case type_boolean:
case type_integer:
case type_real:
case type_date:
case type_duration:
throw std::string (STRING_VARIANT_SUB_STRING);
break;
}
break;

case type_date:

0 comments on commit 660b7c0

Please sign in to comment.