oh, sorry. "the above code" is from alehander42's answer.
type
CKind* = enum Int, String
C* = object
case kind*: CKind:
of Int:
i*: int
of String:
text*: string
var b = C(kind: Int, i: 0)
var a = C(kind: String, text: "")
RunI'd like to know how to write methods for 'Int' and 'String' structures in this code.
