Add diagnostic for _ expressions (typed holes)

This commit is contained in:
Lukas Wirth 2023-05-28 13:30:34 +02:00
parent 150082b0e3
commit 8bc826dd53
9 changed files with 368 additions and 61 deletions

View file

@ -52,6 +52,7 @@ diagnostics![
PrivateAssocItem,
PrivateField,
ReplaceFilterMapNextWithFindMap,
TypedHole,
TypeMismatch,
UndeclaredLabel,
UnimplementedBuiltinMacro,
@ -73,6 +74,12 @@ pub struct BreakOutsideOfLoop {
pub bad_value_break: bool,
}
#[derive(Debug)]
pub struct TypedHole {
pub expr: InFile<AstPtr<ast::Expr>>,
pub expected: Type,
}
#[derive(Debug)]
pub struct UnresolvedModule {
pub decl: InFile<AstPtr<ast::Module>>,