You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of using fieldPairs + hasCustomPragma on a dereferenced ref value gives different results depending on if the ref type is declared directly or with a separate object type.
Example
import macros
templatecustomPragma {.pragma.}
typeRefType=refobject
field {.customPragma.}: intObjType=object
field {.customPragma.}: intRefType2=refObjTypeblock:
let x =RefType()
for fieldName, fieldSym infieldPairs(x[]):
echohasCustomPragma(fieldSym, customPragma)
block:
let x =RefType2()
for fieldName, fieldSym infieldPairs(x[]):
echohasCustomPragma(fieldSym, customPragma)
Current Output
false
true
Expected Output
true
true
Additional Information
Tested with latest devel.
The text was updated successfully, but these errors were encountered:
The result of using
fieldPairs
+hasCustomPragma
on a dereferenced ref value gives different results depending on if the ref type is declared directly or with a separate object type.Example
Current Output
Expected Output
Additional Information
Tested with latest devel.
The text was updated successfully, but these errors were encountered: