Skip to content

Commit 54504cc

Browse files
committed
Test error for bad star-arg type for ctypes.Array
1 parent 4a35062 commit 54504cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test-data/unit/check-ctypes.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,7 @@ reveal_type(intarr4(*int_values)) # E: Revealed type is 'ctypes.Array[ctypes.c_
167167
reveal_type(intarr4(*c_int_values)) # E: Revealed type is 'ctypes.Array[ctypes.c_int]'
168168
reveal_type(intarr6(1, ctypes.c_int(2), *int_values)) # E: Revealed type is 'ctypes.Array[ctypes.c_int]'
169169
reveal_type(intarr6(1, ctypes.c_int(2), *c_int_values)) # E: Revealed type is 'ctypes.Array[ctypes.c_int]'
170+
171+
float_values = [1.0, 2.0, 3.0, 4.0]
172+
intarr4(*float_values) # E: Array constructor argument 1 of type "builtins.list[builtins.float*]" is not convertible to the array element type "Iterable[ctypes.c_int]"
170173
[builtins fixtures/floatdict.pyi]

0 commit comments

Comments
 (0)