File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
crates/red_knot_python_semantic/src Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -752,7 +752,9 @@ fn symbol_from_bindings_impl<'db>(
752
752
753
753
if let Some ( first) = types. next ( ) {
754
754
let boundness = match unbound_visibility {
755
- Truthiness :: AlwaysTrue => return Symbol :: Unbound ,
755
+ Truthiness :: AlwaysTrue => {
756
+ unreachable ! ( "If we have at least one binding, the scope-start should not be definitely visible" )
757
+ }
756
758
Truthiness :: AlwaysFalse => Boundness :: Bound ,
757
759
Truthiness :: Ambiguous => Boundness :: PossiblyUnbound ,
758
760
} ;
@@ -841,7 +843,9 @@ fn symbol_from_declarations_impl<'db>(
841
843
} ;
842
844
if conflicting. is_empty ( ) {
843
845
let boundness = match undeclared_visibility {
844
- Truthiness :: AlwaysTrue => return Ok ( Symbol :: Unbound . into ( ) ) ,
846
+ Truthiness :: AlwaysTrue => {
847
+ unreachable ! ( "If we have at least one declaration, the scope-start should not be definitely visible" )
848
+ }
845
849
Truthiness :: AlwaysFalse => Boundness :: Bound ,
846
850
Truthiness :: Ambiguous => Boundness :: PossiblyUnbound ,
847
851
} ;
Original file line number Diff line number Diff line change @@ -401,7 +401,8 @@ impl<'db> Class<'db> {
401
401
/// directly. Use [`Class::class_member`] if you require a method that will
402
402
/// traverse through the MRO until it finds the member.
403
403
pub ( super ) fn own_class_member ( self , db : & ' db dyn Db , name : & str ) -> SymbolAndQualifiers < ' db > {
404
- class_symbol ( db, self . body_scope ( db) , name)
404
+ let body_scope = self . body_scope ( db) ;
405
+ class_symbol ( db, body_scope, name)
405
406
}
406
407
407
408
/// Returns the `name` attribute of an instance of this class.
You can’t perform that action at this time.
0 commit comments