File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ static std::unordered_set<std::string> Metamethods = {
7878 " close" s // Lua 5.4
7979};
8080
81- const std::string_view version = " 0.34.0 " sv;
81+ const std::string_view version = " 0.34.1 " sv;
8282const std::string_view extension = " yue" sv;
8383
8484class CompileError : public std ::logic_error {
@@ -4786,7 +4786,7 @@ class YueCompilerImpl {
47864786 auto newBlock = funLit->new_ptr <Block_t>();
47874787 if (funLit->body ) {
47884788 auto last = lastStatementFrom (funLit->body );
4789- if (!last->appendix && last->content .is <Return_t>() && !funLit->defaultReturn .is <DefaultValue_t>()) {
4789+ if (last && !last->appendix && last->content .is <Return_t>() && !funLit->defaultReturn .is <DefaultValue_t>()) {
47904790 throw CompileError (" duplicated return statement" , last->content );
47914791 }
47924792 auto content = funLit->body ->content .get ();
You can’t perform that action at this time.
0 commit comments