mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
fix Issue 23567 - pragma(printf) messes up with the vtable of extern(C++) classes
This commit is contained in:
parent
b953c592c1
commit
a6e34f8ae8
2 changed files with 10 additions and 0 deletions
|
@ -1584,6 +1584,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
|||
if (pd.ident == Id.printf || pd.ident == Id.scanf)
|
||||
{
|
||||
s.setPragmaPrintf(pd.ident == Id.printf);
|
||||
s.dsymbolSemantic(sc2);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
9
compiler/test/compilable/issue23567.d
Normal file
9
compiler/test/compilable/issue23567.d
Normal file
|
@ -0,0 +1,9 @@
|
|||
// https://issues.dlang.org/show_bug.cgi?id=23567
|
||||
extern(C++) abstract class CCvar
|
||||
{
|
||||
public:
|
||||
pragma(printf) void func1(const(char)* pFormat, ...);
|
||||
pragma(printf) void func2(const(char)* pFormat, ...);
|
||||
}
|
||||
|
||||
static assert(__traits(getVirtualIndex, CCvar.func2) == 1);
|
Loading…
Add table
Add a link
Reference in a new issue