You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import future, sequtils
typeValidation[A] =objectValidator[X, A] = X ->Validation[A]
procmkValidator[A](
msg: string,
predicate: A ->bool
): Validator[A, A] =var a: A
let b = a
block:
type
Y =object
yVal: string
zObj: Z
Z =object
zVal: boollet
valY =mkValidator("yVal is empty", (y: Y) => y.yVal.len >0)
block:
type
Y =object
yVal: string
zObj: Z
Z =object
zVal: boollet
valY =mkValidator("yVal is empty", (y: Y) => y.yVal.len >0)
Minimal example:
fails on that assert: https://github.com/nim-lang/Nim/blob/devel/compiler/ccgexprs.nim#L201
The text was updated successfully, but these errors were encountered: