[Issue 19017] Calling objc method returning struct segfaults
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 10 08:28:20 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19017
--- Comment #1 from Jacob Carlborg <doob at me.com> ---
Update the D code for the latest compiler:
extern (C) int printf(in char*, ...);
struct Bar
{
int a, b, c, d, e;
}
extern (Objective-C)
extern class Foo
{
static Foo alloc() @selector("alloc");
Foo init() @selector("init");
Bar getValue() @selector("getValue");
}
void main()
{
auto f = Foo.alloc.init;
auto b = f.getValue;
printf("%d\n", b.a);
}
--
More information about the Digitalmars-d-bugs
mailing list