S0040: unknown named type
Generated from rellum-diagnostics/src/db.rs.
Explanation
Type annotations, constructors, and generic instantiations must reference a type that is declared, imported, or built into the language. An unknown type name cannot be resolved to a layout or ownership rule.
Common causes
- referencing a type name that is not declared or imported
- misspelling a record or enum type name
- using type arguments with a name that is not a generic type
Canonical fixes
- declare or import the referenced type
Before:
value: Point = Point { x: 0, y: 0 }
After:
type Point = { x: Int, y: Int }
value: Point = Point { x: 0, y: 0 }
- correct the spelling or import path for the type
Code example
value: Point = Point { x: 0, y: 0 }