Checker: Remove unnecessary unreachable (#7181)

This commit is contained in:
Micha Reiser 2023-09-06 09:21:03 +02:00 committed by GitHub
parent 5f59101811
commit 31990b8d3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -528,11 +528,7 @@ where
&self.semantic.definitions,
);
self.semantic.push_definition(definition);
self.semantic.push_scope(match &stmt {
Stmt::FunctionDef(stmt) => ScopeKind::Function(stmt),
_ => unreachable!("Expected Stmt::FunctionDef"),
});
self.semantic.push_scope(ScopeKind::Function(function_def));
self.deferred.functions.push(self.semantic.snapshot());