Skip to content

Commit b68e78d

Browse files
committed
C#: Stub generator support for static virtual and static abstract interface members.
1 parent aa4b98b commit b68e78d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

csharp/ql/src/Stubs/Stubs.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private string stubStaticOrConst(Member m) {
443443
}
444444

445445
private string stubOverride(Member m) {
446-
if m.getDeclaringType() instanceof Interface
446+
if m.getDeclaringType() instanceof Interface and not m.isStatic()
447447
then result = ""
448448
else
449449
if m.(Virtualizable).isVirtual()
@@ -741,13 +741,13 @@ private string stubOperator(Operator o, Assembly assembly) {
741741
then
742742
result =
743743
" " + stubModifiers(o) + stubExplicit(o) + "operator " + stubClassName(o.getReturnType()) +
744-
"(" + stubParameters(o) + ") => throw null;\n"
744+
"(" + stubParameters(o) + ")" + stubImplementation(o) + ";\n"
745745
else
746746
if not o.getDeclaringType() instanceof Enum
747747
then
748748
result =
749749
" " + stubModifiers(o) + stubClassName(o.getReturnType()) + " operator " + o.getName() +
750-
"(" + stubParameters(o) + ") => throw null;\n"
750+
"(" + stubParameters(o) + ")" + stubImplementation(o) + ";\n"
751751
else result = " // Stub generator skipped operator: " + o.getName() + "\n"
752752
}
753753

0 commit comments

Comments
 (0)