007 chain second err leaks first resource

○ Planned This feature is planned but not yet implemented.

OWED hole: a second |err in a chain that leaks the first opened resource is refused.

Failure Output

Showing last 10 of 11 lines
  --> /Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/335_OBLIGATION_STRESS/335_007_chain_second_err_leaks_first_resource/db.kz:20:1
    |
 20 | ~pub tor connect { url: string }
    | ^

error[PARSE003]: single continuation branch 'started' carrying a payload is a one-variant tag union — declare the single output as a bare return instead: `-> *Transaction`
  --> /Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/335_OBLIGATION_STRESS/335_007_chain_second_err_leaks_first_resource/db.kz:34:1
    |
 34 | ~pub tor query { conn: *Connection<connected>, sql: string }
    | ^

Code

input.kz

Supporting Files

db.kz

Actual compiler output

error[PARSE003]: single continuation branch 'connected' carrying a payload is a one-variant tag union — declare the single output as a bare return instead: `-> *Connection`
  --> /Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/335_OBLIGATION_STRESS/335_007_chain_second_err_leaks_first_resource/db.kz:20:1
    |
 20 | ~pub tor connect { url: string }
    | ^

error[PARSE003]: single continuation branch 'started' carrying a payload is a one-variant tag union — declare the single output as a bare return instead: `-> *Transaction`
  --> /Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/335_OBLIGATION_STRESS/335_007_chain_second_err_leaks_first_resource/db.kz:34:1
    |
 34 | ~pub tor query { conn: *Connection<connected>, sql: string }
    | ^

Must contain:

was not discharged

Flows

flow ~connect click a branch to expand · @labels scroll to their anchor
connect (url: "postgres://localhost/test")

Test Configuration

MUST_ERROR