File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -813,16 +813,16 @@ def analyze_overloaded_func_def(self, defn: OverloadedFuncDef) -> None:
813813 # We know this is an overload def. Infer properties and perform some checks.
814814 self .process_final_in_overload (defn )
815815 self .process_static_or_class_method_in_overload (defn )
816- if defn .impl :
817- self .process_overload_impl (defn )
816+ self .process_overload_impl (defn )
818817
819818 def process_overload_impl (self , defn : OverloadedFuncDef ) -> None :
820819 """Set flags for an overload implementation.
821820
822821 Currently, this checks for a trivial body in protocols classes,
823822 where it makes the method implicitly abstract.
824823 """
825- assert defn .impl is not None
824+ if defn .impl is None :
825+ return
826826 impl = defn .impl if isinstance (defn .impl , FuncDef ) else defn .impl .func
827827 if is_trivial_body (impl .body ) and self .is_class_scope () and not self .is_stub_file :
828828 assert self .type is not None
You can’t perform that action at this time.
0 commit comments