mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 13:23:08 +02:00
TW-1511: Interpret string subtraction as concanetation with a dash
Fixes #1537 (previously known as TW-1511).
This commit is contained in:
parent
cad9a4f834
commit
1417be626f
1 changed files with 12 additions and 1 deletions
|
@ -1278,8 +1278,19 @@ Variant& Variant::operator-= (const Variant& other)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case type_string:
|
case type_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);
|
throw std::string (STRING_VARIANT_SUB_STRING);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case type_date:
|
case type_date:
|
||||||
switch (right._type)
|
switch (right._type)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue