mirror of
https://github.com/github/codeql.git
synced 2026-04-22 15:25:18 +02:00
C#: We can't do any reasoning based on unknown types on whether they match in a pattern.
This commit is contained in:
@@ -293,6 +293,8 @@ private predicate isMatchingConstant(PatternExpr pe, boolean value) {
|
||||
value = true
|
||||
or
|
||||
exists(Type t, Type strippedType |
|
||||
not t instanceof UnknownType and
|
||||
not strippedType instanceof UnknownType and
|
||||
typePatternMustHaveMatchingCompletion(pe, t, strippedType) and
|
||||
not typePatternCommonSubType(t, strippedType) and
|
||||
value = false
|
||||
|
||||
Reference in New Issue
Block a user