mirror of
https://github.com/erg-lang/erg.git
synced 2025-12-23 05:36:48 +00:00
15 lines
378 B
Python
15 lines
378 B
Python
for! {"a": 1, "b": 2}.values(), s =>
|
|
print! "key: " + s # ERR
|
|
for! {"a": 1, "b": 2}.keys(), i =>
|
|
print! i + 0 # ERR
|
|
|
|
dic as {Nat: Int} = {1: -1}
|
|
_ = dic[-1] # ERR
|
|
|
|
l as List! {Str: Int} = ![{"a": 1}]
|
|
l.push!({"b": 2}) # OK
|
|
l.push!({1: "a"}) # ERR
|
|
|
|
_: Mapping(Int, Str) = {1: "a", 2: "b"}
|
|
_: Iterable(Int) = {1: "a", 2: "b"}
|
|
_: Mapping(Str, Int) = {1: "a", 2: "b"} # ERR
|