021 enum tag explicit value refused

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU173]: std/types:enum(ThreatLevel): tag 'low: 5' carries an explicit value — rung 1 mints implicit ordinals only (i64, 0-based)
  --> tests/regression/600_STDLIB/665_PROTO/665_021_enum_tag_explicit_value_refused/input.k:5:1

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~enum click a branch to expand · @labels scroll to their anchor
enum (ThreatLevel, source: low: 5 high)

Test Configuration

MUST_ERROR