OxL Справочник OxL
РусскийEnglish

op ..

..

Приоритет: 5   Ассоциативность: нет

Определяется в

Примеры

oxl
type Bytes2 = [u8; 2]                     // псевдоним, тот же тип
type UserId = distinct u64                // новый тип, без неявных приведений
type Port   = u16 where 1..=65535         // уточнённый тип
type Name   = str where len(1..=64)
type Email  = str where matches(re".+@.+\..+")

— 3.6 Псевдонимы, новые и уточнённые типы

Связанные диагностики

chained-comparison, not-callable, not-overloadable, operator-decl, range-not-iterable, invalid-char, refinement-violated, non-exhaustive, pattern-bindings, unreachable-arm, bad-init, missing-field, must-close, positional-literal

См. также