@@ -1058,7 +1058,7 @@ impl<'db> TypeInferenceBuilder<'db> {
1058
1058
let use_def = self . index . use_def_map ( declaration. file_scope ( self . db ( ) ) ) ;
1059
1059
let prior_bindings = use_def. bindings_at_declaration ( declaration) ;
1060
1060
// unbound_ty is Never because for this check we don't care about unbound
1061
- let inferred_ty = symbol_from_bindings ( self . db ( ) , self . scope ( ) , prior_bindings )
1061
+ let inferred_ty = symbol_from_bindings ( self . db ( ) , prior_bindings , self . scope ( ) )
1062
1062
. ignore_possibly_unbound ( )
1063
1063
. unwrap_or ( Type :: Never ) ;
1064
1064
let ty = if inferred_ty. is_assignable_to ( self . db ( ) , ty. inner_type ( ) ) {
@@ -4181,7 +4181,7 @@ impl<'db> TypeInferenceBuilder<'db> {
4181
4181
// If we're inferring types of deferred expressions, always treat them as public symbols
4182
4182
let ( local_scope_symbol, report_unresolved_usage) = if self . is_deferred ( ) {
4183
4183
let symbol = if let Some ( symbol_id) = symbol_table. symbol_id_by_name ( symbol_name) {
4184
- symbol_from_bindings ( db, self . scope ( ) , use_def . public_bindings ( symbol_id ) )
4184
+ symbol_from_bindings ( db, use_def . public_bindings ( symbol_id ) , self . scope ( ) )
4185
4185
} else {
4186
4186
assert ! (
4187
4187
self . deferred_state. in_string_annotation( ) ,
@@ -4193,7 +4193,7 @@ impl<'db> TypeInferenceBuilder<'db> {
4193
4193
( symbol, true )
4194
4194
} else {
4195
4195
let use_id = name_node. scoped_use_id ( db, scope) ;
4196
- let symbol = symbol_from_bindings ( db, self . scope ( ) , use_def . bindings_at_use ( use_id ) ) ;
4196
+ let symbol = symbol_from_bindings ( db, use_def . bindings_at_use ( use_id ) , self . scope ( ) ) ;
4197
4197
let report_unresolved_usage = use_def. is_symbol_use_reachable ( db, use_id) ;
4198
4198
( symbol, report_unresolved_usage)
4199
4199
} ;
@@ -4258,7 +4258,7 @@ impl<'db> TypeInferenceBuilder<'db> {
4258
4258
file_scope_id,
4259
4259
) {
4260
4260
EagerBindingsResult :: Found ( bindings) => {
4261
- return symbol_from_bindings ( db, self . scope ( ) , bindings ) . into ( ) ;
4261
+ return symbol_from_bindings ( db, bindings , self . scope ( ) ) . into ( ) ;
4262
4262
}
4263
4263
// There are no visible bindings here.
4264
4264
// Don't fall back to non-eager symbol resolution.
@@ -4280,7 +4280,7 @@ impl<'db> TypeInferenceBuilder<'db> {
4280
4280
// runtime, it is the scope that creates the cell for our closure.) If the name
4281
4281
// isn't bound in that scope, we should get an unbound name, not continue
4282
4282
// falling back to other scopes / globals / builtins.
4283
- return symbol ( db, enclosing_scope_id , symbol_name ) ;
4283
+ return symbol ( db, symbol_name , enclosing_scope_id ) ;
4284
4284
}
4285
4285
}
4286
4286
@@ -4299,7 +4299,7 @@ impl<'db> TypeInferenceBuilder<'db> {
4299
4299
file_scope_id,
4300
4300
) {
4301
4301
EagerBindingsResult :: Found ( bindings) => {
4302
- return symbol_from_bindings ( db, self . scope ( ) , bindings ) . into ( ) ;
4302
+ return symbol_from_bindings ( db, bindings , self . scope ( ) ) . into ( ) ;
4303
4303
}
4304
4304
// There are no visible bindings here.
4305
4305
EagerBindingsResult :: NotFound => {
@@ -7455,7 +7455,7 @@ mod tests {
7455
7455
assert_eq ! ( scope. name( db) , * expected_scope_name) ;
7456
7456
}
7457
7457
7458
- symbol ( db, scope , symbol_name ) . symbol
7458
+ symbol ( db, symbol_name , scope ) . symbol
7459
7459
}
7460
7460
7461
7461
#[ track_caller]
0 commit comments