mirror of https://github.com/astral-sh/ruff
Checker: Remove unnecessary unreachable (#7181)
This commit is contained in:
parent
5f59101811
commit
31990b8d3f
|
|
@ -528,11 +528,7 @@ where
|
||||||
&self.semantic.definitions,
|
&self.semantic.definitions,
|
||||||
);
|
);
|
||||||
self.semantic.push_definition(definition);
|
self.semantic.push_definition(definition);
|
||||||
|
self.semantic.push_scope(ScopeKind::Function(function_def));
|
||||||
self.semantic.push_scope(match &stmt {
|
|
||||||
Stmt::FunctionDef(stmt) => ScopeKind::Function(stmt),
|
|
||||||
_ => unreachable!("Expected Stmt::FunctionDef"),
|
|
||||||
});
|
|
||||||
|
|
||||||
self.deferred.functions.push(self.semantic.snapshot());
|
self.deferred.functions.push(self.semantic.snapshot());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue