File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/red_knot_python_semantic Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ class Base: ...
51
51
# error: [no-matching-overload] "No overload of class `type` matches arguments"
52
52
type (b " Foo" , (), {})
53
53
54
- # TODO : this should be an error
55
- type (" Foo" , str , {})
54
+ # error: [no-matching-overload] "No overload of class `type` matches arguments"
55
+ type (" Foo" , Base , {})
56
56
57
57
# TODO : this should be an error
58
58
type (" Foo" , (1 , 2 ), {})
Original file line number Diff line number Diff line change @@ -2907,10 +2907,10 @@ impl<'db> Type<'db> {
2907
2907
. with_annotated_type ( KnownClass :: Str . to_instance ( db) ) ,
2908
2908
Parameter :: positional_only ( Some ( Name :: new_static ( "bases" ) ) )
2909
2909
// TODO: Should be tuple[type, ...] once we have support for homogenous tuples
2910
- . with_annotated_type ( Type :: any ( ) ) ,
2910
+ . with_annotated_type ( KnownClass :: Tuple . to_instance ( db ) ) ,
2911
2911
Parameter :: positional_only ( Some ( Name :: new_static ( "dict" ) ) )
2912
2912
// TODO: Should be `dict[str, Any]` once we have support for generics
2913
- . with_annotated_type ( Type :: any ( ) ) ,
2913
+ . with_annotated_type ( KnownClass :: Dict . to_instance ( db ) ) ,
2914
2914
] ) ,
2915
2915
Some ( KnownClass :: Type . to_instance ( db) ) ,
2916
2916
) ,
You can’t perform that action at this time.
0 commit comments