-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement method calls #577
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #577 +/- ##
==========================================
+ Coverage 87.61% 87.87% +0.25%
==========================================
Files 271 271
Lines 31453 31898 +445
==========================================
+ Hits 27559 28029 +470
+ Misses 3894 3869 -25 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just some minor comments.
} | ||
|
||
/// Filter methods based on the specified lookup mode. | ||
pub fn with_association_opt(self, association: Option<AssociationMode>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it make more sense to have without_association
, as the Some case is already covered by with_association
?
@@ -362,6 +403,8 @@ impl<'db> MethodResolutionCtx<'db> { | |||
} | |||
} | |||
|
|||
// Check if the function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial comment?
id: *expr, | ||
found: receiver_ty, | ||
}); | ||
match self.lookup_field(receiver_ty.clone(), name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let Some(..) = ..
?
) | ||
.map_or_else(identity, Some); | ||
|
||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover comment?
Adds syntax for method calls and infers return types and argument types.