The fix is that `formalParams` is typed rather than untyped. all the `Sym`'s 
need to be `Ident`'s, i.e.
    
    
    proc deSym(x: NimNode):NimNode =
      if x.kind==nnkSym:
        return ident(x.strval)
      result = x
      for i,n in x.pairs:
        result[i] = n.desym
    ...
    # # #
        formalParams = typeImpl[0].deSym
    # # #
    
    
    Run

I don't understand why `Sym "x"` is acceptable at top level, frankly. I know 
vaguely that lambdas have different rules inside and outside procs I suppose 
that must have something to do with it

Reply via email to