mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +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 |