Skip to content

Commit dd64cd2

Browse files
committed
C#: Fix CIL::Method::canReturn() to ignore stubs and only consider the best implementation.
1 parent d1ada95 commit dd64cd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csharp/ql/src/semmle/code/cil/Method.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class Method extends DotNet::Callable, Element, Member, TypeContainer, DataFlowN
181181
override predicate hasBody() { exists(getImplementation()) }
182182

183183
override predicate canReturn(DotNet::Expr expr) {
184-
exists(Return ret | ret.getImplementation().getMethod() = this and expr = ret.getExpr())
184+
exists(Return ret | ret.getImplementation() = this.getImplementation() and expr = ret.getExpr())
185185
}
186186
}
187187

0 commit comments

Comments
 (0)