compilation cache: fixed recently introduced bug (lazy loading of bodies)
This commit is contained in:
parent
dc08a033d9
commit
089e287c6e
7 changed files with 63 additions and 19 deletions
13
tests/rodfiles/tgeneric1.nim
Normal file
13
tests/rodfiles/tgeneric1.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: "abcd"
|
||||
"""
|
||||
|
||||
import tables
|
||||
|
||||
var x = initTable[int, string]()
|
||||
|
||||
x[2] = "ab"
|
||||
x[5] = "cd"
|
||||
|
||||
echo x[2], x[5]
|
||||
|
||||
13
tests/rodfiles/tgeneric2.nim
Normal file
13
tests/rodfiles/tgeneric2.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: "abef"
|
||||
"""
|
||||
|
||||
import tables
|
||||
|
||||
var x = initTable[int, string]()
|
||||
|
||||
x[2] = "ab"
|
||||
x[5] = "ef"
|
||||
|
||||
echo x[2], x[5]
|
||||
|
||||
|
|
@ -309,6 +309,10 @@ proc runRodFiles(r: var TResults, options: string) =
|
|||
test "bmethods2.nim"
|
||||
delNimCache()
|
||||
|
||||
# test generics:
|
||||
test "tgeneric1.nim"
|
||||
test "tgeneric2.nim"
|
||||
delNimCache()
|
||||
|
||||
proc compileRodFiles(r: var TResults, options: string) =
|
||||
template test(filename: expr): stmt =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue