v.comptime: fix compilation of examples/veb/veb_example.v with V compiled with tcc on macos

This commit is contained in:
Delyan Angelov 2024-11-10 11:55:53 +02:00
parent 65038a4a2a
commit 9fc3a24ca6

View File

@ -154,7 +154,9 @@ pub fn (mut ct ComptimeInfo) get_type(node ast.Expr) ast.Type {
} }
return f.return_type return f.return_type
} else if node is ast.IndexExpr && ct.is_comptime_var(node.left) { } else if node is ast.IndexExpr && ct.is_comptime_var(node.left) {
return ct.table.value_type(ct.resolver.unwrap_generic(ct.get_type(node.left))) nltype := ct.get_type(node.left)
nltype_unwrapped := ct.resolver.unwrap_generic(nltype)
return ct.table.value_type(nltype_unwrapped)
} }
return ast.void_type return ast.void_type
} }