summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
authorRegis Caillaud <35006197+Clonkk@users.noreply.github.com>2022-02-02 09:44:51 +0100
committerGitHub <noreply@github.com>2022-02-02 09:44:51 +0100
commit486cb09ec2caef60011b3d182bfd188dadafdf62 (patch)
tree0586bc75bdb856a61688ed994db036b813774e01 /tests/pragmas
parent1830a3b505c33be5fc3b9e311c5e7720d9b37b32 (diff)
downloadNim-486cb09ec2caef60011b3d182bfd188dadafdf62.tar.gz
Clonkk fix2 11923 (#19451)
* fix nnkBracketExpr not compiling for getImpl on customPragmaNode

* fix test import

* fix alias not working with hasCustomPragmas
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/tcustom_pragma.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim
index 1c3709b26..db2536188 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -20,16 +20,22 @@ block:
     MyGenericObj[T] = object
       myField1, myField2 {.myAttr: "hi".}: int
 
+    MyOtherObj = MyObj
+
 
   var o: MyObj
   static:
     doAssert o.myField2.hasCustomPragma(myAttr)
     doAssert(not o.myField1.hasCustomPragma(myAttr))
+    doAssert(not o.myField1.hasCustomPragma(MyObj))
+    doAssert(not o.myField1.hasCustomPragma(MyOtherObj))
 
   var ogen: MyGenericObj[int]
   static:
     doAssert ogen.myField2.hasCustomPragma(myAttr)
     doAssert(not ogen.myField1.hasCustomPragma(myAttr))
+    doAssert(not ogen.myField1.hasCustomPragma(MyGenericObj))
+    doAssert(not ogen.myField1.hasCustomPragma(MyGenericObj))
 
 
 import custom_pragma