class

TraitClaim

Inherits Reference < Object

the trait bounds of the context of a TraitClaim represents the traits that we can assume when proving the trait

Constructors

new(source : Ast::TopLevelItem, context : TypeContext, trait : Trait)
Source

Instance methods

context
Source
location

def initialize(@source : Ast::TopLevelItem, @type_params : Slice(TypeParameter), type : Type, trait : Trait) @trait = Trait.new(trait.base, Slice[type] + trait.type_args) end

Source
source
Source
status
Source
status=(status : ImplStatus)
Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
trait
Source
type_params
Source