mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #5421 from tamasvajk/feature/codequalityfixes
C#: Fix code quality issues reported by code scanning
This commit is contained in:
@@ -151,13 +151,10 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
if (handleProp is null)
|
||||
{
|
||||
var underlyingSymbolProp = GetPropertyInfo(Symbol, "UnderlyingSymbol");
|
||||
if (underlyingSymbolProp is not null)
|
||||
if (underlyingSymbolProp?.GetValue(Symbol) is object underlying)
|
||||
{
|
||||
if (underlyingSymbolProp.GetValue(Symbol) is object underlying)
|
||||
{
|
||||
handleProp = GetPropertyInfo(underlying, "Handle");
|
||||
handleObj = underlying;
|
||||
}
|
||||
handleProp = GetPropertyInfo(underlying, "Handle");
|
||||
handleObj = underlying;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using Semmle.Extraction.Kinds;
|
||||
|
||||
namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
{
|
||||
internal class ImplicitCast : Expression
|
||||
internal sealed class ImplicitCast : Expression
|
||||
{
|
||||
public Expression Expr
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using Semmle.Extraction.Kinds;
|
||||
|
||||
namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
{
|
||||
internal class MemberAccess : Expression
|
||||
internal sealed class MemberAccess : Expression
|
||||
{
|
||||
private MemberAccess(ExpressionNodeInfo info, ExpressionSyntax qualifier, ISymbol? target) : base(info)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user