aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/parser.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index d2cf38a..caf970e 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -3510,10 +3510,21 @@ namespace build2
if (!vnull)
{
- untypify (rhs);
+ if (vtype != nullptr)
+ untypify (rhs);
+
names& d (rhs.as<names> ());
- assert (d.size () == 1); // Must be single value.
- concat_data = move (d[0]);
+
+ // If the value is empty, then untypify() will (typically; no pun
+ // intended) represent it as an empty sequence of names rather than
+ // a sequence of one empty name. This is usually what we need (see
+ // simple_reverse() for details) but not in this case.
+ //
+ if (!d.empty ())
+ {
+ assert (d.size () == 1); // Must be a single value.
+ concat_data = move (d[0]);
+ }
}
};