summary refs log tree commit diff stats
path: root/tests/generics/t3770.nim
blob: ffccbeeb5579f11a144d6279dba6b89c39c6ee36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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)