class Carbon::Tacky::Reference

A “reference.” A reference is essentially a mapping to an instruction that returned a value, and the reference takes the place of said value. The reference represents the return value of an instruction.

Attributes

id[R]

The id of the instruction that this reference points to.

@return [::Numeric]

Public Class Methods

new(id) click to toggle source

Initializes the reference with the given ID.

@param id [::Numeric] The ID.

# File lib/carbon/tacky/reference.rb, line 18
def initialize(id)
  @id = id
end

Public Instance Methods

as(type) click to toggle source
# File lib/carbon/tacky/reference.rb, line 22
def as(type)
  Tacky::Typed.new(self, type)
end