erg/tests/should_err/mut_list.er
2024-04-04 23:24:07 +09:00

16 lines
217 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
_: List!(Int, _) = !["a"] # ERR
_: List!(Int, 1) = ![1, 2] # ERR