37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System.Diagnostics;
|
|
using Microsoft.CodeAnalysis.CSharp.Symbols;
|
|
|
|
namespace Microsoft.CodeAnalysis.CSharp;
|
|
|
|
internal sealed class BoundPreviousSubmissionReference : BoundExpression
|
|
{
|
|
public new TypeSymbol Type => base.Type;
|
|
|
|
public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
|
|
: base(BoundKind.PreviousSubmissionReference, syntax, type, hasErrors)
|
|
{
|
|
}
|
|
|
|
public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type)
|
|
: base(BoundKind.PreviousSubmissionReference, syntax, type)
|
|
{
|
|
}
|
|
|
|
[DebuggerStepThrough]
|
|
public override BoundNode? Accept(BoundTreeVisitor visitor)
|
|
{
|
|
return visitor.VisitPreviousSubmissionReference(this);
|
|
}
|
|
|
|
public BoundPreviousSubmissionReference Update(TypeSymbol type)
|
|
{
|
|
if (!TypeSymbol.Equals(type, Type, (TypeCompareKind)0))
|
|
{
|
|
BoundPreviousSubmissionReference boundPreviousSubmissionReference = new BoundPreviousSubmissionReference(Syntax, type, base.HasErrors);
|
|
boundPreviousSubmissionReference.CopyAttributes(this);
|
|
return boundPreviousSubmissionReference;
|
|
}
|
|
return this;
|
|
}
|
|
}
|