Open SanderMertens opened 6 years ago
Code generators also do not properly handle the ref_i32
type. The C type code generator generates the following code:
typedef int32_t test_i32_ref;
This should be:
typedef int32_t *test_i32_ref;
Additionally the generated APIs also generate incorrect types (int32_t
instead of int32_t*
).
Type size calculation is wrong too. The primitive type size is used, not the size of a reference (sizeof(corto_object)
).
When the following cortoscript code is parsed:
it crashes with this stack trace: