002 duplicate foreign refused

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

Code

input.k

Actual compiler output

error[KORU030]: duplicate foreign entry 'File' — a foreign entry is registered once; the declaration at tests/regression/600_STDLIB/667_FOREIGN/667_002_duplicate_foreign_refused/input.k:10 collides with the prior registration at tests/regression/600_STDLIB/667_FOREIGN/667_002_duplicate_foreign_refused/input.k:6
  --> tests/regression/600_STDLIB/667_FOREIGN/667_002_duplicate_foreign_refused/input.k:10:0

❌ Compiler coordination error: Phantom semantic validation failed
   (set KORU_BACKEND_TRACE=1 for the backend return trace)

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: File, source: path)
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: File, source: handle)

Test Configuration

MUST_ERROR