055 reject nested kernel init

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

Code

input.k

Actual compiler output

error[KORU170]: std.kernel:init inside a kernel scope declares a second kernel view — one kernel scope owns exactly one view, so the inner init would be claimed by the outer one and its dataset never emitted; give each init its own flow, and note that iteration across two views has no kernel op yet (at tests/regression/300_ADVANCED_FEATURES/390_KERNEL/390_055_reject_nested_kernel_init/input.k:23:0)
  --> tests/regression/300_ADVANCED_FEATURES/390_KERNEL/390_055_reject_nested_kernel_init/input.k:18:0

Error output must contain

std.kernel:init inside a kernel scope declares a second kernel view

Flows

flow ~shape click a branch to expand · @labels scroll to their anchor
shape (expr: Body, source: mass: f64,)
flow ~init click a branch to expand · @labels scroll to their anchor
init (expr: Body, source: { mass: 1.0 }, { mass: 2.0 },)

Test Configuration

MUST_ERROR