···122122 },
123123 CallInClauseGuard, // case x { _ if f() -> 1 }
124124 IfExpression,
125125- ConstantRecordConstructorNoArguments, // const x = Record()
126126- TypeDefinitionNoArguments, // pub type Wibble() { ... }
125125+ TypeDefinitionNoArguments, // pub type Wibble() { ... }
127126 UnknownAttributeRecordVariant, // an attribute was used that is not know for a custom type variant
128127 // a Python-like import was written, such as `import gleam.io`, instead of `import gleam/io`
129128 IncorrectImportModuleSeparator {
···675674 .join("\n"),
676675 hint: None,
677676 label_text: "Gleam doesn't have if expressions".into(),
678678- extra_labels: vec![],
679679- },
680680-681681- ParseErrorType::ConstantRecordConstructorNoArguments => ParseErrorDetails {
682682- text: "A record must be passed arguments when constructed.".into(),
683683- hint: None,
684684- label_text: "I was expecting arguments here".into(),
685677 extra_labels: vec![],
686678 },
687679
···11+---
22+source: compiler-core/src/type_/tests/errors.rs
33+expression: "\npub type A { A }\nconst a = A()\n"
44+---
55+----- SOURCE CODE
66+77+pub type A { A }
88+const a = A()
99+1010+1111+----- ERROR
1212+error: Type mismatch
1313+ ┌─ /src/one/two.gleam:3:11
1414+ │
1515+3 │ const a = A()
1616+ │ ^^^
1717+1818+This value is being called as a function but its type is:
1919+2020+ A