mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-02 21:49:02 +00:00
12 lines
172 B
Nim
12 lines
172 B
Nim
import std/macros
|
|
|
|
|
|
template myPragma(x: int) {.pragma.}
|
|
|
|
type
|
|
A = object
|
|
x: int64
|
|
|
|
B {.myPragma(sizeof(A)).} = object
|
|
|
|
doAssert B.getCustomPragmaVal(myPragma) == 8 |