Files
Nim/tests/generics/t3770.nim
ringabout 16f42084d3 fixes #20900; Calling template through from generic function across module fails to build (#21649)
* fixes #20900; Calling template through from generic function across module fails to build

* sanother way
2023-04-13 12:11:06 +02:00

14 lines
277 B
Nim

# bug #3770
import m3770
doAssert $jjj() == "(hidden: 15)" # works
proc someGeneric(_: type) =
doAssert $jjj() == "(hidden: 15)" # fails: "Error: the field 'hidden' is not accessible."
someGeneric(int)
# bug #20900
proc c(y: int | int, w: Opt = Opt.none) = discard
c(0)