Files
Nim/tests/ic/tgenerics.nim
Andreas Rumpf e3e9742143 added a 'koch ic' command for easier adhoc testing of IC (#17508)
* added a 'koch ic' command for easier adhoc testing of IC
* IC: progress
* IC: enable generics test
* make tests green
2021-03-26 08:52:26 +01:00

39 lines
426 B
Nim

discard """
output: "bar"
"""
import tables
var tab: Table[string, string]
tab["foo"] = "bar"
echo tab["foo"]
#!EDIT!#
discard """
output: "bar 3"
"""
import tables
var tab: Table[string, string]
var tab2: Table[string, int]
tab["foo"] = "bar"
tab2["meh"] = 3
echo tab["foo"], " ", tab2["meh"]
#!EDIT!#
discard """
output: "3"
"""
import tables
var tab2: Table[string, int]
tab2["meh"] = 3
echo tab2["meh"]