redefine pragma

Redefinition of template symbols with the same signature is allowed. This can be made explicit with the redefine pragma:

  1. template foo: int = 1
  2. echo foo() # 1
  3. template foo: int {.redefine.} = 2
  4. echo foo() # 2
  5. # warning: implicit redefinition of template
  6. template foo: int = 3

This is mostly intended for macro generated code.