Fixing multiple return values bugs

This commit is contained in:
Krzosa Karol
2022-06-16 12:48:20 +02:00
parent c262e7e491
commit 9c58d4f116
2 changed files with 13 additions and 21 deletions

View File

@@ -548,7 +548,8 @@ gen_ast(Ast *ast){
}
CASE(VAR_UNPACK, Var_Unpack){
For(node->vars) {gen_ast(it);}
For(node->vars)
gen_ast(it);
Scratch scratch;
gen_simple_decl(node->resolved_type);
@@ -559,9 +560,8 @@ gen_ast(Ast *ast){
gen(";");
int i = 0;
For(node->vars) {
gen("%Q = %Q.m%d;", it->name, var_name, i);
}
For(node->vars)
gen("%Q = %Q.m%d;", it->name, var_name, i++);
BREAK();
}
@@ -717,7 +717,6 @@ end_compilation(){
#if 1
gen(R"==(
#include <stdint.h>
#include <stdio.h>
#include <math.h>
typedef int8_t S8;
typedef int16_t S16;