erg/tests/should_err/infer_union_array.er
2022-12-05 00:41:37 +09:00

6 lines
125 B
Python

f x: [{""}; _] = None
arr = ["aaa"]
for! arr, elem =>
a = ["", "aaa"] # [{"", "aaa"}; 2]
f a # ERR: type mismatched