class T::Types::TypeVariable
provides some syntax for the static type checker
Since we do type erasure at runtime, this just validates the variance and
def initialize(variance)
def initialize(variance) if !VALID_VARIANCES.include?(variance) raise TypeError.new("invalid variance #{variance}") end @variance = variance end
def name
def name Untyped.new.name end
def subtype_of_single?(type)
def subtype_of_single?(type) true end
def valid?(obj)
def valid?(obj) true end