052 pattern branches

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

Code

input.kz

Actual compiler output

error[KORU021]: tor 'test-patterns' has no branch 'GET /users/:id' (available: (none))
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_052_pattern_branches/input.kz:19:1
    |
 19 | | [GET /users/:id] => ok
    | ^

error[KORU021]: tor 'test-patterns' has no branch 'POST /users' (available: (none))
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_052_pattern_branches/input.kz:20:1
    |
 20 | | [POST /users] => ok
    | ^

error[KORU021]: tor 'test-patterns' has no branch 'nested [brackets] work' (available: (none))
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_052_pattern_branches/input.kz:21:1
    |
 21 | | [nested [brackets] work] => ok
    | ^

error[KORU021]: tor 'test-patterns' has no branch '* -> stopped' (available: (none))
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_052_pattern_branches/input.kz:22:1
    |
 22 | | [* -> stopped] => ok  // State machine style
    | ^

error[KORU021]: tor 'test-patterns' has no branch '/admin/*' (available: (none))
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_052_pattern_branches/input.kz:26:1
    |
 26 | | [/admin/*] |> test-patterns()
    | ^

error[KORU021]: tor 'test-patterns' has no branch 'GET /dashboard' (available: (none))
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_052_pattern_branches/input.kz:27:5
    |
 27 |     | [GET /dashboard] => ok
    |     ^

Frontend must reject with:

CONTAINS no branch 'GET /users/:id'

Flows

flow ~test-patterns click a branch to expand · @labels scroll to their anchor
test-patterns
flow ~test-patterns click a branch to expand · @labels scroll to their anchor
test-patterns

Test Configuration

MUST_ERROR