summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2022-08-23 22:41:30 +0300
committerGitHub <noreply@github.com>2022-08-23 21:41:30 +0200
commitd1d141b135a605f81935e89322549013e5be3863 (patch)
tree27d0552df431ffa940ba8f66dc4be5507de2ad8d /compiler/ast.nim
parent14656154efa2b3f08a341742c697fd1064f40166 (diff)
downloadNim-d1d141b135a605f81935e89322549013e5be3863.tar.gz
new .redefine pragma for templates, warn on redefinition without it (#20211)
* test CI for template redefinitions

* adapt asyncmacro

* fix quote

* fix again

* try something else

* revert

* fix ioselectors_select, disable packages CI

* adapt more tests & simplify

* more

* more

* more

* rename to redefine, warn on implicit redefinition

* basic documentation [skip ci]

* Update compiler/lineinfos.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r--compiler/ast.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 910c95451..c720a76fb 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -334,6 +334,7 @@ const
   sfEscapes* = sfProcvar              # param escapes
   sfBase* = sfDiscriminant
   sfCustomPragma* = sfRegister        # symbol is custom pragma template
+  sfTemplateRedefinition* = sfExportc # symbol is a redefinition of an earlier template
 
 const
   # getting ready for the future expr/stmt merge