diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index edab7f4..7cd39af 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -59,7 +59,7 @@ inline std::string s(std::string_view sv) { | |||
| 59 | return std::string(sv); | 59 | return std::string(sv); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | const std::string_view version = "0.7.10"sv; | 62 | const std::string_view version = "0.7.11"sv; |
| 63 | const std::string_view extension = "yue"sv; | 63 | const std::string_view extension = "yue"sv; |
| 64 | 64 | ||
| 65 | class YueCompilerImpl { | 65 | class YueCompilerImpl { |
| @@ -1573,9 +1573,11 @@ private: | |||
| 1573 | if (*j != nullNode) { | 1573 | if (*j != nullNode) { |
| 1574 | if (auto ssVal = simpleSingleValueFrom(*j)) { | 1574 | if (auto ssVal = simpleSingleValueFrom(*j)) { |
| 1575 | if (ssVal->value.is<const_value_t>()) { | 1575 | if (ssVal->value.is<const_value_t>()) { |
| 1576 | throw std::logic_error(_info.errorMessage("can not destruct a const value"sv, ssVal->value)); | 1576 | throw std::logic_error(_info.errorMessage("can not destructure a const value"sv, ssVal->value)); |
| 1577 | } | 1577 | } |
| 1578 | } | 1578 | } |
| 1579 | } else { | ||
| 1580 | throw std::logic_error(_info.errorMessage("can not destructure a nil value"sv, destructNode)); | ||
| 1579 | } | 1581 | } |
| 1580 | destructPairs.push_back({i,j}); | 1582 | destructPairs.push_back({i,j}); |
| 1581 | auto subDestruct = destructNode->new_ptr<TableLit_t>(); | 1583 | auto subDestruct = destructNode->new_ptr<TableLit_t>(); |
