Open ayananerv opened 1 month ago
This is probably caused by https://github.com/zigtools/zls/issues/1841
This is probably caused by zigtools/zls#1841
Wow you really nailed it!!!
My first allocated memory has a type of u8
:
const buffer = try arena.alloc(u8, stat.size);
And the type deduction is u8
When I changed this line to const buffer = try arena.alloc(usize, stat.size);
, all the left deductions are changed to usize
!
I'm actually not familiar with vscode-zig and I just disabled zls in vscode a few days ago. It seems that this plugin depends on zls.
vscode-zig version:
Zig Language
v0.5.9
Issues:
I want a pointer with type
*usize
, so I allocated some memory withArenaAllocator
,. It should give me a buffer with type[]usize
, but the hinted result is[]u8
: