October 24, 2012
On 10/24/12, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
> On 10/24/12, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
>> Agreed. File to bugzilla unless Walter disagrees?
>
> Also, what should the error message look like? I've got a pull in works fwiw.

Small test-case:

extern(C) void fail(int[4] x);
extern(C) int[4] fail2();

extern(C) void c_ok1(ref int[4] x);
extern(C) void c_ok2(out int[4] x);
extern(C) void c_ok3(int[4]* x);
extern(C) ref int[4] c_ok4();
extern(C) int[4]* c_ok5();

Have I covered everything?
October 24, 2012
Andrej Mitrovic:

The issue you have opened is:
http://d.puremagic.com/issues/show_bug.cgi?id=8887


> Have I covered everything?

The implementation of D associative arrays is opaque, so why is this allowed?

extern(C) void foo(int[int] aa);
void main() {}

Bye,
bearophile
October 24, 2012
On 10/24/12, bearophile <bearophileHUGS@lycos.com> wrote:
> Andrej Mitrovic:
>
> The issue you have opened is: http://d.puremagic.com/issues/show_bug.cgi?id=8887

And pull https://github.com/D-Programming-Language/dmd/pull/1215

> The implementation of D associative arrays is opaque, so why is this allowed?
>
> extern(C) void foo(int[int] aa);
> void main() {}

Well this is less dangerous than the OP case, but maybe it should be disallowed. Another bug should be opened for this.
1 2
Next ›   Last »