If the `enum` that defines SDL_QUIT is marked `{.pure.}`, then you have to 
refer to SDL_QUIT as [fully 
qualified](https://nim-lang.org/docs/manual.html#pragmas-pure-pragma)
    
    
    type
      sdlEv {.pure.} = enum
        ...
        SDL_QUIT,
        ...
    
    if e.`type` == sdlEv.SDL_QUIT:
        SDL_Quit()
    

It makes your code much more verbose, and may not be style you want your code 
to be, but may be an option.

Also note, in writing this in Nim, should try for [NEP1 coding 
style](https://nim-lang.org/docs/nep1.html) to be consistent with other Nim 
programs (but then not consistent with SDL C ....  and yes, my example wasn't 
NEP1 either)

Reply via email to