C#: Stub generator support for static virtual and static abstract interface members.

This commit is contained in:
Michael Nebel
2023-02-22 13:35:10 +01:00
parent aa4b98bbd5
commit b68e78d908

View File

@@ -443,7 +443,7 @@ private string stubStaticOrConst(Member m) {
}
private string stubOverride(Member m) {
if m.getDeclaringType() instanceof Interface
if m.getDeclaringType() instanceof Interface and not m.isStatic()
then result = ""
else
if m.(Virtualizable).isVirtual()
@@ -741,13 +741,13 @@ private string stubOperator(Operator o, Assembly assembly) {
then
result =
" " + stubModifiers(o) + stubExplicit(o) + "operator " + stubClassName(o.getReturnType()) +
"(" + stubParameters(o) + ") => throw null;\n"
"(" + stubParameters(o) + ")" + stubImplementation(o) + ";\n"
else
if not o.getDeclaringType() instanceof Enum
then
result =
" " + stubModifiers(o) + stubClassName(o.getReturnType()) + " operator " + o.getName() +
"(" + stubParameters(o) + ") => throw null;\n"
"(" + stubParameters(o) + ")" + stubImplementation(o) + ";\n"
else result = " // Stub generator skipped operator: " + o.getName() + "\n"
}