✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a closed tag set cannot repeat a member — a duplicate tag is a
// Koru-layer refusal naming the tag.
import std/types
std/types:enum(ThreatLevel) {
low
medium
low
}
Actual compiler output
error[KORU173]: std/types:enum(ThreatLevel): tag 'low' is declared twice — a closed tag set cannot repeat a member
--> tests/regression/600_STDLIB/665_PROTO/665_022_enum_duplicate_tag_refused/input.k:5:1Compiler 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
medium
low)
Test Configuration
MUST_ERROR