https://issues.dlang.org/show_bug.cgi?id=19700
--- Comment #3 from Jacob Carlborg <[email protected]> --- (In reply to Adam D. Ruppe from comment #2) > OK, I see. Well, in the mean time, at least now that I know what is causing > this, it is very easy to work around. (It was just crazy at first to narrow > it down, and since I frequently "comment" stuff with `version(none)` and > that didn't change it, I thought I was crazy when it went away.) > > It is arguably bad form to include those extern(D) overloads side by side, > though it is convenient, it isn't necessary. So, a possible fix to consider > would just be to make it an error to mix extern declarations and body > functions in the same class definition (excluding inherited declarations). I don't think that would work. Because then this won't work: extern (Objective-C) class NSObject { NSObject init() @selector("init"); static NSObject alloc() @selector("alloc"); } extern (Objective-C) class Foo : NSObject { override Foo init() @selector("init"); override static Foo alloc() @selector("alloc"); void foo() @selector("foo") { } } In Foo we override "init" and "alloc" just to get the correct static return type. I think the above example has to work. --
