Files
2026-08-27 10:56:38 -06:00

46 lines
1.3 KiB
C#

using System.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CSharp;
internal sealed class BoundSlicePatternRangePlaceholder : BoundEarlyValuePlaceholderBase
{
public sealed override bool IsEquivalentToThisReference
{
get
{
throw ExceptionUtilities.Unreachable("/_/src/Compilers/CSharp/Portable/BoundTree/BoundExpression.cs", 227);
}
}
public new TypeSymbol Type => base.Type;
public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
: base(BoundKind.SlicePatternRangePlaceholder, syntax, type, hasErrors)
{
}
public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type)
: base(BoundKind.SlicePatternRangePlaceholder, syntax, type)
{
}
[DebuggerStepThrough]
public override BoundNode? Accept(BoundTreeVisitor visitor)
{
return visitor.VisitSlicePatternRangePlaceholder(this);
}
public BoundSlicePatternRangePlaceholder Update(TypeSymbol type)
{
if (!TypeSymbol.Equals(type, Type, (TypeCompareKind)0))
{
BoundSlicePatternRangePlaceholder boundSlicePatternRangePlaceholder = new BoundSlicePatternRangePlaceholder(Syntax, type, base.HasErrors);
boundSlicePatternRangePlaceholder.CopyAttributes(this);
return boundSlicePatternRangePlaceholder;
}
return this;
}
}