C#: Use explicit typing for enums in the stub generator.

This commit is contained in:
Michael Nebel
2022-08-11 13:08:54 +02:00
parent 9ff94120d8
commit f71d684a08

View File

@@ -160,7 +160,7 @@ abstract private class GeneratedType extends Type, GeneratedElement {
private string stubBaseTypesString() {
if this instanceof Enum
then result = ""
then result = " : " + this.(Enum).getUnderlyingType().toStringWithTypes()
else
if exists(this.getAnInterestingBaseType())
then
@@ -726,7 +726,7 @@ pragma[noinline]
private string stubEnumConstant(EnumConstant ec, Assembly assembly) {
ec instanceof GeneratedMember and
ec.getALocation() = assembly and
result = " " + escapeIfKeyword(ec.getName()) + "=" + ec.getValue() + ",\n"
result = " " + escapeIfKeyword(ec.getName()) + " = " + ec.getValue() + ",\n"
}
pragma[noinline]