Skip to content

Commit 63e54b4

Browse files
committed
C#: Harden cs/useless-cast-to-self for BMN extracted databases.
1 parent 87c77cc commit 63e54b4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

csharp/ql/src/Language Abuse/UselessCastToSelf.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ where
1919
type = cast.getTargetType() and
2020
type = e.getType() and
2121
not type instanceof NullType and
22+
not type instanceof UnknownType and
2223
not e.(ImplicitDelegateCreation).getArgument() instanceof AnonymousFunctionExpr
2324
select cast, "This cast is redundant because the expression already has type " + type + "."

0 commit comments

Comments
 (0)