mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Merge pull request #2095 from tbabej/test_fixes
TW-1511: Interpret string subtraction as concanetation with a dash
This commit is contained in:
commit
660b7c09af
1 changed files with 12 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue