betterC error?

rikki cattermole rikki at cattermole.co.nz
Tue Jun 12 12:29:17 UTC 2018


On 13/06/2018 12:13 AM, makedgreatagain wrote:
> this very simple code can not build with betterC
> 
> void test(byte[] x){
> 
> }
> 
> extern(C) int main(string[] args){
>        byte[] data = [0, 1];
>      test(data);
>      return 0;
> }

Well yes, dynamic arrays require the GC and hence TypeInfo. Slices 
don't, but that isn't a slice as it isn't from some random malloc'd memory.


More information about the Digitalmars-d mailing list