File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
crates/ty_python_semantic Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ directly.
14
14
15
15
### Negation
16
16
17
- <!-- pull-types:skip -->
18
-
19
17
``` py
20
18
from typing import Literal
21
19
from ty_extensions import Not, static_assert
Original file line number Diff line number Diff line change @@ -9432,12 +9432,16 @@ impl<'db> TypeInferenceBuilder<'db, '_> {
9432
9432
9433
9433
// Type API special forms
9434
9434
SpecialFormType :: Not => match arguments_slice {
9435
- ast:: Expr :: Tuple ( _) => {
9435
+ ast:: Expr :: Tuple ( tuple) => {
9436
+ for element in tuple {
9437
+ self . infer_type_expression ( element) ;
9438
+ }
9436
9439
if let Some ( builder) = self . context . report_lint ( & INVALID_TYPE_FORM , subscript) {
9437
9440
builder. into_diagnostic ( format_args ! (
9438
9441
"Special form `{special_form}` expected exactly one type parameter" ,
9439
9442
) ) ;
9440
9443
}
9444
+ self . store_expression_type ( arguments_slice, Type :: unknown ( ) ) ;
9441
9445
Type :: unknown ( )
9442
9446
}
9443
9447
_ => {
You can’t perform that action at this time.
0 commit comments