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> {
11201120 self . analyze ( pat. syntax ( ) ) ?. binding_mode_of_pat ( self . db , pat)
11211121 }
11221122
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+
11231127 pub fn resolve_method_call ( & self , call : & ast:: MethodCallExpr ) -> Option < Function > {
11241128 self . analyze ( call. syntax ( ) ) ?. resolve_method_call ( self . db , call)
11251129 }
Original file line number Diff line number Diff line change @@ -303,6 +303,14 @@ impl SourceAnalyzer {
303303 }
304304 }
305305
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+
306314 pub ( crate ) fn resolve_field (
307315 & self ,
308316 db : & dyn HirDatabase ,
You can’t perform that action at this time.
0 commit comments