Documentation
¶
Overview ¶
Package types contains target-independent semantic types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assignable ¶
func Equivalent ¶
Equivalent compares semantic types while ignoring binding-level readonly state. Mutable generic containers use it to avoid unsound argument widening.
Types ¶
type Kind ¶
type Kind string
const ( Invalid Kind = "invalid" Any Kind = "any" Void Kind = "void" Bool Kind = "bool" Int Kind = "int" Float Kind = "float" String Kind = "string" Bytes Kind = "bytes" StringBuilder Kind = "string_builder" Array Kind = "array" Range Kind = "range" Iterable Kind = "iterable" Hash Kind = "hash" Union Kind = "union" Named Kind = "named" Nil Kind = "nil" )
type Type ¶
func CommonType ¶ added in v0.1.8
CommonType returns the most-specific type that can represent both inputs through portable implicit conversions. It deliberately does not fall back to Any: callers choose whether a missing common type is an error, a union, or a dynamic boundary.
Click to show internal directories.
Click to hide internal directories.