roc/test/snapshots/expr/when_simple.md
2025-10-16 07:00:23 -07:00

771 B

META

description=Simple when expression
type=expr

SOURCE

when x is
    Ok(value) -> value
    Err(msg) -> msg

EXPECTED

UNDEFINED VARIABLE - when_simple.md:1:1:1:5

PROBLEMS

UNDEFINED VARIABLE Nothing is named when in this scope. Is there an import or exposing missing up-top?

when_simple.md:1:1:1:5:

when x is

^^^^

TOKENS

LowerIdent,LowerIdent,LowerIdent,
UpperIdent,NoSpaceOpenRound,LowerIdent,CloseRound,OpArrow,LowerIdent,
UpperIdent,NoSpaceOpenRound,LowerIdent,CloseRound,OpArrow,LowerIdent,
EndOfFile,

PARSE

(e-ident (raw "when"))

FORMATTED

when

CANONICALIZE

(e-runtime-error (tag "ident_not_in_scope"))

TYPES

(expr (type "Error"))