Skip to content

Commit

Permalink
[red-knot] use debug_assert for name ctx in infer_type_expression
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
  • Loading branch information
chriskrycho and AlexWaygood committed Aug 28, 2024
1 parent 23db1bd commit 530ef26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/red_knot_python_semantic/src/types/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ impl<'db> TypeInferenceBuilder<'db> {
// stub of the forms other than a standalone name in scope.
match expression {
ast::Expr::Name(name) => {
assert!(
debug_assert!(
name.ctx.is_load(),
"name in a type expression is always 'load' but got: '{:?}'",
name.ctx
Expand Down

0 comments on commit 530ef26

Please sign in to comment.