From b6d97b07bf79eea79aaf5df0e7a5df3ad45c6613 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Thu, 2 Mar 2023 14:17:49 +0100 Subject: [PATCH] C#: Also print the unsafe keyword for eg. classes when creating stubs. --- csharp/ql/src/Stubs/Stubs.qll | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 276f3f7e8ab..78cd18c34ec 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -132,11 +132,11 @@ abstract private class GeneratedType extends Type, GeneratedElement { else ( not this instanceof DelegateType and result = - this.stubAttributes() + stubAccessibility(this) + this.stubAbstractModifier() + - this.stubStaticModifier() + this.stubPartialModifier() + this.stubKeyword() + " " + - this.getUndecoratedName() + stubGenericArguments(this) + this.stubBaseTypesString() + - stubTypeParametersConstraints(this) + "\n{\n" + this.stubPrivateConstructor() + - this.stubMembers(assembly) + "}\n\n" + this.stubAttributes() + stubUnsafe(this) + stubAccessibility(this) + + this.stubAbstractModifier() + this.stubStaticModifier() + this.stubPartialModifier() + + this.stubKeyword() + " " + this.getUndecoratedName() + stubGenericArguments(this) + + this.stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + + this.stubPrivateConstructor() + this.stubMembers(assembly) + "}\n\n" or result = this.stubAttributes() + stubUnsafe(this) + stubAccessibility(this) + this.stubKeyword() +