roc/test/snapshots/utf8_problem_importable.md
2025-11-27 23:13:24 -05:00

812 B

META

description=Utf8Problem type should be directly importable without qualification
type=snippet

SOURCE

x : Utf8Problem
x = InvalidStartByte

EXPECTED

NIL

PROBLEMS

NIL

TOKENS

LowerIdent,OpColon,UpperIdent,
LowerIdent,OpAssign,UpperIdent,
EndOfFile,

PARSE

(file
	(type-module)
	(statements
		(s-type-anno (name "x")
			(ty (name "Utf8Problem")))
		(s-decl
			(p-ident (raw "x"))
			(e-tag (raw "InvalidStartByte")))))

FORMATTED

NO CHANGE

CANONICALIZE

(can-ir
	(d-let
		(p-assign (ident "x"))
		(e-tag (name "InvalidStartByte"))
		(annotation
			(ty-lookup (name "Utf8Problem") (builtin)))))

TYPES

(inferred-types
	(defs
		(patt (type "Str.Utf8Problem")))
	(expressions
		(expr (type "Str.Utf8Problem"))))