Skip to content

abstract class Crystal::LiteralType
inherits Crystal::Type

Direct known subclasses

Crystal::NumberLiteralType Crystal::SymbolLiteralType

Methods

#add_match(type)

View source

#check_restriction_exception

Checks whether an exception needs to be raised because of a restriction failure. Only overwritten by literal types (NumberLiteralType and SymbolLiteralType) when they produce an ambiguous call.

View source

#cover(*args, **options)

View source

#cover

View source

#cover_size(*args, **options)

View source

#cover_size

View source

#exact_match?

View source

#match : Type?

The most exact match type, or the first match otherwise

View source

#remove_literal

View source

#set_exact_match(type)

View source