From 40f84c09974c03405a63c9eba32df7209de4bec0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Feb 2024 09:44:08 +0200 Subject: Add comment on json_array assignment issue --- libbuild2/variable.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx index 795af6c..6cdf3ee 100644 --- a/libbuild2/variable.cxx +++ b/libbuild2/variable.cxx @@ -2154,6 +2154,10 @@ namespace build2 // Tricky: this can still be JSON input text that is an array. And if // it's not, then make it an element of an array. // + // @@ Hm, this is confusing: [json_array] a = null ! Maybe not? But then + // this won't work: [json_array] a = ([json_array] null). Maybe + // distinguish in assign? + // json_value v (to_json_value (ns.front (), "json")); if (v.type == json_type::array) -- cgit v1.1