ไม่เคย
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Primitive never type for code paths that do not return normally.
Aliases: never
Syntax: ไม่เคย
Category#
type
Related#
Examples#
radix/corpus/numquam/numquam.fab (canonical · keyword)#
Primitive never type for code paths that do not return normally.
# =============================================================================
# ไม่เคย — Primitive never type for code paths that do not return normally.
# =============================================================================
#
# What this teaches:
# • Diverging functions — `ไม่เคย` marks functions like `ตาย` that never return to the caller.
# • Type-system bottom — `ไม่เคย` is the bottom type, compatible with any return position.
#
# Common mistakes:
# • Using ไม่เคย for functions that might sometimes return normally — ไม่เคย is only for code paths that never return.
#
# See also: ตาย, ทางออก
# =============================================================================
# ไม่เคย — diverging return type
#
# GRAMMAR:
# returnType :← 'ไม่เคย'
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
# BACKEND:
# Cross-ref: ตาย/mori.fab.
#
fn fail(string message) → never {
panic message
}