> Since you already called to_json with a string argument your later invocation 
> of it uses the previously created proc.

Thanks, I see now, thanks. I couldn't imagine it could work this way :)

> if you change proc to template your example will work as expected.

Indeed, it works. Although I think it make situation worse, now it's even more 
complicated. It's not just 3 cases - proc vs generics & templates & its order, 
but 4 cases - proc vs generics vs templates vs its order.

I think it this approach is wrong and broken. You remove some unrelated code or 
change order of some procs, and your program behaves differently. The good 
thing is that such cases are relativelly rare.

Reply via email to