C#: Remove explicit (trivial) type requirements on Debug.Assert methods.

This commit is contained in:
Michael Nebel
2025-06-03 15:10:34 +02:00
parent bc4ff598c3
commit d2b8bd5760

View File

@@ -41,9 +41,7 @@ class SystemDiagnosticsDebugClass extends SystemDiagnosticsClass {
/** Gets an `Assert(bool, ...)` method. */
Method getAssertMethod() {
result.getDeclaringType() = this and
result.hasName("Assert") and
result.getParameter(0).getType() instanceof BoolType and
result.getReturnType() instanceof VoidType
result.hasName("Assert")
}
}