https://issues.dlang.org/show_bug.cgi?id=16772
Sprink <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Sprink <[email protected]> --- (In reply to Atila Neves from comment #0) > extern(C++) ubyte[] foo() { return []; } > > dmd foo.d: > > Error: Internal Compiler Error: unsupported type ubyte[] There is no equivalent C++ type that can be represented by "ubyte[]". In D an array consists of a pointer and a size. In C++ an array is essentially just a pointer. This code will result in a compiler error in C++, as the two functions have the same signature. void foo(int* in) { } void foo(int in[]) { } Use a pointer if you want the function to be extern(C++) extern(C++) ubyte* foo() { return null; } --
