erg/tests/should_err/collection.er
Shunsuke Shibayama 293f301a4b feat: add traits
* Sized
* Iterator
* Container
* Collection
* Indexable
* Mapping
2023-05-08 12:11:01 +09:00

7 lines
164 B
Python

arr = [[1, 2], [3, 4]]
print! arr[0][2] # ERR
print! arr[2][0] # ERR
dict = {"a": {"a": 1}, "b": {"b": 2}}
print! dict["c"]["a"] # ERR
print! dict["a"]["c"] # ERR