Skip to content

Commit d698f0a

Browse files
committed
Fix VoidType handling
1 parent 133d760 commit d698f0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

csharp/ql/src/Stubs/Stubs.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import csharp
1515
private import semmle.code.csharp.frameworks.System
16+
private import semmle.code.dotnet.DotNet as DotNet // added to handle VoidType as a ValueOrRefType
1617

1718
/** An element that should be in the generated code. */
1819
abstract class GeneratedElement extends Element { }
@@ -332,7 +333,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement {
332333
}
333334

334335
private predicate isInAssembly(Assembly assembly) {
335-
any(GeneratedType gt | gt.(ValueOrRefType).getDeclaringNamespace() = this)
336+
any(GeneratedType gt | gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this)
336337
.isInAssembly(assembly)
337338
or
338339
this.getChildNamespace(_).isInAssembly(assembly)
@@ -353,7 +354,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement {
353354
this.isInAssembly(assembly) and
354355
result =
355356
concat(GeneratedType gt |
356-
gt.(ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly)
357+
gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly)
357358
|
358359
gt.getStub(assembly) order by gt.getName()
359360
)

0 commit comments

Comments
 (0)