Closed cbuttner closed 1 month ago
module foo(<SIZE>); struct Chunk { char[SIZE] data; } struct Chunk_Array { Chunk* first; Chunk* last; } module bar; import foo; const SIZE = 16; def My_Chunk = Chunk(<SIZE>); fn void tester() { Chunk_Array(<SIZE>) array; My_Chunk* chunk = array.first; // ^^^^^^^^^^^ // Error: Implicitly casting 'Chunk(<16>)*' to 'My_Chunk*' (Chunk(<16>)*) is not permitted, but you may do an explicit cast by placing '(My_Chunk*)' before the expression. }
This seems to occur when at least one of the generic parameters is a constant.
This should now work in master and dev
Thanks, this fixed it on my end.
This seems to occur when at least one of the generic parameters is a constant.