mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 00:24:16 +00:00
Clonkk fix2 11923 (#19451)
* fix nnkBracketExpr not compiling for getImpl on customPragmaNode * fix test import * fix alias not working with hasCustomPragmas
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user