130 nominal string mismatch

? Unknown Status unknown.

Code

// TEST: MUST_FAIL - Nominal string types are distinct
//
// EmailAddress and UserName are both strings, but Koru should reject
// passing one where the other is expected.
//
// Expected: Compilation error - type mismatch

~import "$std/types"

~string(EmailAddress)
~string(UserName)

~event send_email { to: EmailAddress }

~proc send_email|zig {
}

~event main {}

~proc main|zig {
    // ERROR: Passing UserName where EmailAddress is expected
    const name: UserName = "alice";
    ~send_email(to: name)
    | sent |> done {}
}

~main()
input.kz

Must contain:

type mismatch

Error Verification

Expected Error Pattern

MUST_FAIL

Actual Compiler Output

error[KORU003]: inline flows are not supported inside `~proc` bodies: ~send_email(to: name)
  --> tests/regression/000_CORE_LANGUAGE/030_TYPES_VALUES/030_130_nominal_string_mismatch/input.kz:23:5
    |
 23 |     ~send_email(to: name)
    |     ^
  hint: lift this into a top-level subflow (e.g. `~my_event = call(args) | branch x |> done {}`) or invoke the event from outside the proc body

Test Configuration

MUST_FAIL