https://issues.dlang.org/show_bug.cgi?id=12613
--- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> --- Ok so this is a bit weird, in 'InterfaceDeclaration::semantic' COM interfaces are handled like so: if (com) sc->linkage = LINKwindows; else if (cpp) sc->linkage = LINKcpp; But in 'ClassDeclaration::semantic' the code path is different: if (isCOMclass()) { if (global.params.isWindows) sc->linkage = LINKwindows; else /* This enables us to use COM objects under Linux and * work with things like XPCOM */ sc->linkage = LINKc; } Is this mismatch an oversight or deliberate? It's also the reason why there are no proper diagnostics. There is a check in 'BaseClass::fillVtbl': if (fd->linkage != ifd->linkage) fd->error("linkage doesn't match interface function"); But the two will match in COM classes because the scope's linkage is modified, not the actual functions themselves. So what's the best way forward? --