mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
19 lines
329 B
C#
19 lines
329 B
C#
class UselessIsBeforeAs
|
|
{
|
|
public object M(object x)
|
|
{
|
|
if (x is string)
|
|
{
|
|
M(x as string); // GOOD
|
|
return (x as string) + " "; // BAD
|
|
}
|
|
else
|
|
{
|
|
return x as UselessIsBeforeAs; // GOOD
|
|
}
|
|
return null;
|
|
}
|
|
|
|
void M(string s) { }
|
|
}
|