about summary refs log tree commit diff
path: root/src/codegen.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/codegen.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index 152572f..30ef293 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -248,7 +248,7 @@ pub const CodeGen = struct {
 
         for (0.., function_call_statement.arguments) |i, argument| {
             const arg = try self.generate_expression_value(argument, null);
-            const expected_type = function.node_type.TYPE.FUNCTION_TYPE.parameters[i];
+            const expected_type = function.node_type.TYPE.FUNCTION_TYPE.parameters[i]; //TODO: If varargs we shouldnt do this
             std.debug.print("2 TYP {s}: {any} vs {any}\n", .{ function_call_statement.expression.PRIMARY_EXPRESSION.IDENTIFIER.name, expected_type.TYPE, arg.node_type.TYPE });
             std.debug.assert(self.compare_types(expected_type, arg.node_type, false));
             try arguments.append(arg.value);
@@ -1066,6 +1066,7 @@ const Environment = struct {
     }
 
     fn add_variable(self: *Environment, name: []const u8, variable: *Variable) !void {
+        // TODO: Dont allow shadowing if value != value or type != type (across things)
         try self.scope_stack.getLast().variables.put(name, variable);
     }