it works this way:
    
    
    type
        AuthenticatorType = enum
            None,
            Basic,
            Session,
            Cookie
        Authenticator = object
            case type: AuthenticatorType:
                of None: discard
                of Basic:   username, password: string
                of Session: sessionID: string
                of Cookie:  name, value: string
    
    
    Run

you can't just let of None: dangle around, you need to add a discard

Reply via email to