永不
Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans 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
}