File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,10 @@ impl<'db> SemanticsImpl<'db> {
1120
1120
self . analyze ( pat. syntax ( ) ) ?. binding_mode_of_pat ( self . db , pat)
1121
1121
}
1122
1122
1123
+ pub fn resolve_expr_as_callable ( & self , call : & ast:: Expr ) -> Option < Callable > {
1124
+ self . analyze ( call. syntax ( ) ) ?. resolve_expr_as_callable ( self . db , call)
1125
+ }
1126
+
1123
1127
pub fn resolve_method_call ( & self , call : & ast:: MethodCallExpr ) -> Option < Function > {
1124
1128
self . analyze ( call. syntax ( ) ) ?. resolve_method_call ( self . db , call)
1125
1129
}
Original file line number Diff line number Diff line change @@ -303,6 +303,14 @@ impl SourceAnalyzer {
303
303
}
304
304
}
305
305
306
+ pub ( crate ) fn resolve_expr_as_callable (
307
+ & self ,
308
+ db : & dyn HirDatabase ,
309
+ call : & ast:: Expr ,
310
+ ) -> Option < Callable > {
311
+ self . type_of_expr ( db, & call. clone ( ) ) ?. 0 . as_callable ( db)
312
+ }
313
+
306
314
pub ( crate ) fn resolve_field (
307
315
& self ,
308
316
db : & dyn HirDatabase ,
You can’t perform that action at this time.
0 commit comments