Files
Nim/tests/ccgbugs2/tinefficient_const_table.nim
Timothee Cour 7e1ae35195 testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343)
* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-12-14 10:58:29 +01:00

28 lines
512 B
Nim

discard """
output: '''a
long
list
of
words'''
cmd: r"nim c --hints:on $options -d:release $file"
ccodecheck: "! @'genericSeqAssign'"
targets: "c"
"""
# bug #4354
import tables
import sets
import strutils
#const FRUITS = ["banana", "apple", "grapes"]
#let FRUITS = ["banana", "apple", "grapes"].toHashSet
const FRUITS = {"banana":0, "apple":0, "grapes":0}.toTable
proc main() =
let L = "a long list of words".split()
for word in L:
if word notin FRUITS:
echo(word)
main()