```d
extern(Objective-C):
extern class NSObject
{
static NSObject alloc() @selector("alloc");
NSObject init() @selector("init");
}
extern class MTLRenderPassColorDescriptor : NSObject
{
override static MTLRenderPassColorDescriptor alloc();
override MTLRenderPassColorDescriptor init();
}
extern(C) void metalTest()
{
auto renderPass = MTLRenderPassColorDescriptor.alloc; //Makes it crash during compilation
}
```
I get a compiler crash when calling those functions. To fix it, one must put a @selector. Keep in mind that the selectors are usually inferred, but that doesn't seem to happen when extending/overriding another class.
Please, fix that or at least issue a compile error instead of crashing.
Comment #1 by msnmancini — 2023-03-11T15:26:22Z
The selectors aren't actually inferred, I got a plenty of bugs from that. They could be inferred or just get some compiler errors from that
Comment #2 by robert.schadek — 2024-12-13T19:27:38Z