@@ -211,11 +211,11 @@ class Array(Generic[T, N]):
211
211
def __init__ (self ) -> None :
212
212
self = intrinsic ("init.array" , Array [T , N ])
213
213
214
- def __getitem__ (self , index : int | i32 | u32 | i64 | u64 ) -> T :
214
+ def __getitem__ (self , index : int | u32 | i64 | u64 ) -> T :
215
215
return intrinsic ("array.ref" , T , byref (self ), index ) # type: ignore
216
216
217
- def __setitem__ (self , index : int | i32 | u32 | i64 | u64 , value : T | int | float ) -> None :
218
- """value: T | int | float annotation is to make mypy happy. this function is ignored by the compiler"""
217
+ def __setitem__ (self , index : int | u32 | i64 | u64 , value : T ) -> None :
218
+ pass
219
219
220
220
def __len__ (self ) -> u64 :
221
221
return intrinsic ("array.size" , u64 , self ) # type: ignore
@@ -236,11 +236,10 @@ def __len__(self) -> u64:
236
236
237
237
@opaque ("Buffer" )
238
238
class Buffer (Generic [T ]):
239
- def __getitem__ (self , index : int | i32 | u32 | i64 | u64 ) -> T :
239
+ def __getitem__ (self , index : int | u32 | i64 | u64 ) -> T :
240
240
return intrinsic ("buffer.ref" , T , self , index ) # type: ignore
241
241
242
- def __setitem__ (self , index : int | i32 | u32 | i64 | u64 , value : T | int | float ) -> None :
243
- """value: T | int | float annotation is to make mypy happy. this function is ignored by the compiler"""
242
+ def __setitem__ (self , index : int | u32 | i64 | u64 , value : T ) -> None :
244
243
pass
245
244
246
245
def __len__ (self ) -> u64 :
0 commit comments