MZ2007
MZ2007 · Type Error · ERROR
Undefined Type
A type name was used that has not been defined.

Cause

The type referenced in a type annotation or struct literal does not exist.

Examples

Example 1

Problem:

user: Usr = Usr { name: Alice }

Usr is not a defined type (maybe misspelled).

Fix:

Use the correct type name: User

Hint

Check the type name spelling. Types are case-sensitive.

Suggestion

Define the type (struct/enum) or import the module.

Related