Table of Contents

Class IrInstruction.TypeTest

Namespace
MuLang.IR
Assembly
MuLang.IR.dll

Tests whether a value conforms to a type.

public sealed record IrInstruction.TypeTest : IrInstruction, IEquatable<IrInstruction>, IEquatable<IrInstruction.TypeTest>
Inheritance
IrInstruction.TypeTest
Implements
Inherited Members

Constructors

TypeTest(TextSpan, int, int, TypeSymbol)

Tests whether a value conforms to a type.

public TypeTest(TextSpan Span, int Destination, int Source, TypeSymbol TestedType)

Parameters

Span TextSpan

The source span.

Destination int

The destination slot.

Source int

The source slot.

TestedType TypeSymbol

The tested type.

Properties

Destination

The destination slot.

public int Destination { get; init; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Source

The source slot.

public int Source { get; init; }

Property Value

int

TestedType

The tested type.

public TypeSymbol TestedType { get; init; }

Property Value

TypeSymbol

Methods

Deconstruct(out TextSpan, out int, out int, out TypeSymbol)

public void Deconstruct(out TextSpan Span, out int Destination, out int Source, out TypeSymbol TestedType)

Parameters

Span TextSpan
Destination int
Source int
TestedType TypeSymbol

Equals(IrInstruction?)

public override sealed bool Equals(IrInstruction? other)

Parameters

other IrInstruction

Returns

bool

Equals(TypeTest?)

public bool Equals(IrInstruction.TypeTest? other)

Parameters

other IrInstruction.TypeTest

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(TypeTest?, TypeTest?)

public static bool operator ==(IrInstruction.TypeTest? left, IrInstruction.TypeTest? right)

Parameters

left IrInstruction.TypeTest
right IrInstruction.TypeTest

Returns

bool

operator !=(TypeTest?, TypeTest?)

public static bool operator !=(IrInstruction.TypeTest? left, IrInstruction.TypeTest? right)

Parameters

left IrInstruction.TypeTest
right IrInstruction.TypeTest

Returns

bool