From 9fc3a24ca65e1665ffd5ec735d1bb0dd5ea10d46 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 10 Nov 2024 11:55:53 +0200 Subject: [PATCH] v.comptime: fix compilation of `examples/veb/veb_example.v` with V compiled with tcc on macos --- vlib/v/comptime/comptimeinfo.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/v/comptime/comptimeinfo.v b/vlib/v/comptime/comptimeinfo.v index 18465672d8..32bb18aeed 100644 --- a/vlib/v/comptime/comptimeinfo.v +++ b/vlib/v/comptime/comptimeinfo.v @@ -154,7 +154,9 @@ pub fn (mut ct ComptimeInfo) get_type(node ast.Expr) ast.Type { } return f.return_type } 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 }