Rellum Rellum

S0027: type mismatch

Generated from rellum-diagnostics/src/db.rs.

Explanation

Every binding, function parameter, match arm, and feedback state has one concrete type. For feedback state, the initial value establishes the state type for all future ticks; every clause must produce that same type so the state slot has a stable layout.

Common causes

Canonical fixes

Before:

count: Int ~ feedback(
    on press => "one",
    0
)

After:

count: Int ~ feedback(
    on press => 1,
    0
)

Before:

count: Int ~ feedback(
    on press => "one",
    0
)

After:

count: String ~ feedback(
    on press => "one",
    "zero"
)

Before:

message: String = count

After:

message: String = to_string(count)

Code example

count: Int ~ feedback(
    on press => "one",
    0
)