You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Unsupported or invalid type in a type expression"
)),
However, there are many other types that are invalid in type expression contexts. We should remove the final fallback branch from this match statement and make it exhaustive so that all typing errors are correctly reported.
I expect that many invalid types can be covered by a single branch. Doing so might require changing this method so that its return type is std::fmt::Arguments rather than &'static str:
Type::in_type_expression()
already errors for some types that are invalid in type expression contexts:ruff/crates/red_knot_python_semantic/src/types.rs
Lines 2031 to 2043 in ed2bce6
However, there are many other types that are invalid in type expression contexts. We should remove the final fallback branch from this
match
statement and make it exhaustive so that all typing errors are correctly reported.I expect that many invalid types can be covered by a single branch. Doing so might require changing this method so that its return type is
std::fmt::Arguments
rather than&'static str
:ruff/crates/red_knot_python_semantic/src/types.rs
Lines 2208 to 2215 in ed2bce6
The text was updated successfully, but these errors were encountered: