Diagnose unresolved method calls

This commit is contained in:
Lukas Wirth 2023-03-03 20:41:17 +01:00
parent 78b2dd813a
commit e7485a0416
8 changed files with 320 additions and 48 deletions

View file

@ -51,6 +51,7 @@ diagnostics![
UnresolvedField,
UnresolvedImport,
UnresolvedMacroCall,
UnresolvedMethodCall,
UnresolvedModule,
UnresolvedProcMacro,
];
@ -146,6 +147,14 @@ pub struct UnresolvedField {
pub method_with_same_name_exists: bool,
}
#[derive(Debug)]
pub struct UnresolvedMethodCall {
pub expr: InFile<AstPtr<ast::Expr>>,
pub receiver: Type,
pub name: Name,
pub field_with_same_name: Option<Type>,
}
#[derive(Debug)]
pub struct PrivateField {
pub expr: InFile<AstPtr<ast::Expr>>,