Files
PURErat-crack-scode/decompiled/Libraries/microsoft.codeanalysis.csharp/Microsoft.CodeAnalysis.CSharp/BoundFunctionPointerInvocation.cs
T
2026-08-27 10:56:38 -06:00

52 lines
2.3 KiB
C#

using System.Collections.Immutable;
using System.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.Operations;
namespace Microsoft.CodeAnalysis.CSharp;
internal sealed class BoundFunctionPointerInvocation : BoundExpression, IBoundInvalidNode
{
public FunctionPointerTypeSymbol FunctionPointer => (FunctionPointerTypeSymbol)InvokedExpression.Type;
ImmutableArray<BoundNode> IBoundInvalidNode.InvalidNodeChildren => CSharpOperationFactory.CreateInvalidChildrenFromArgumentsExpression(InvokedExpression, Arguments);
protected override ImmutableArray<BoundNode?> Children => StaticCast<BoundNode>.From<BoundNode>(((IBoundInvalidNode)this).InvalidNodeChildren);
public new TypeSymbol Type => base.Type;
public BoundExpression InvokedExpression { get; }
public ImmutableArray<BoundExpression> Arguments { get; }
public ImmutableArray<RefKind> ArgumentRefKindsOpt { get; }
public override LookupResultKind ResultKind { get; }
public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false)
: base(BoundKind.FunctionPointerInvocation, syntax, type, hasErrors || invokedExpression.HasErrors() || arguments.HasErrors())
{
InvokedExpression = invokedExpression;
Arguments = arguments;
ArgumentRefKindsOpt = argumentRefKindsOpt;
ResultKind = resultKind;
}
[DebuggerStepThrough]
public override BoundNode? Accept(BoundTreeVisitor visitor)
{
return visitor.VisitFunctionPointerInvocation(this);
}
public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type)
{
if (invokedExpression != InvokedExpression || arguments != Arguments || argumentRefKindsOpt != ArgumentRefKindsOpt || resultKind != ResultKind || !TypeSymbol.Equals(type, Type, (TypeCompareKind)0))
{
BoundFunctionPointerInvocation boundFunctionPointerInvocation = new BoundFunctionPointerInvocation(Syntax, invokedExpression, arguments, argumentRefKindsOpt, resultKind, type, base.HasErrors);
boundFunctionPointerInvocation.CopyAttributes(this);
return boundFunctionPointerInvocation;
}
return this;
}
}