erg/tests/should_err/mut_array.er
2023-04-29 14:20:10 +09:00

16 lines
219 B
Python

v = ![]
v.push! 1
_ = v[2] # ERR
w = ![]
w.push! "a"
_ = v.concat w # ERR
i_s = ![1 as (Int or Str)]
i_s.push! "b"
i_s.push! 2
i_s.push! None # ERR
_: Array!(Int, _) = !["a"] # ERR
_: Array!(Int, 1) = ![1, 2] # ERR