Skip to content

Commit d2b8bd5

Browse files
committed
C#: Remove explicit (trivial) type requirements on Debug.Assert methods.
1 parent bc4ff59 commit d2b8bd5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/system/Diagnostics.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ class SystemDiagnosticsDebugClass extends SystemDiagnosticsClass {
4141
/** Gets an `Assert(bool, ...)` method. */
4242
Method getAssertMethod() {
4343
result.getDeclaringType() = this and
44-
result.hasName("Assert") and
45-
result.getParameter(0).getType() instanceof BoolType and
46-
result.getReturnType() instanceof VoidType
44+
result.hasName("Assert")
4745
}
4846
}
4947

0 commit comments

Comments
 (0)