mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
C#: Use explicit typing for enums in the stub generator.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user