mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 06:45:27 +00:00
@@ -54,7 +54,8 @@ template macroToExpand(s): untyped =
|
||||
s.kind in {skMacro, skTemplate} and (s.typ.len == 1 or sfAllUntyped in s.flags)
|
||||
|
||||
template macroToExpandSym(s): untyped =
|
||||
s.kind in {skMacro, skTemplate} and (s.typ.len == 1) and not fromDotExpr
|
||||
sfCustomPragma notin s.flags and s.kind in {skMacro, skTemplate} and
|
||||
(s.typ.len == 1) and not fromDotExpr
|
||||
|
||||
template isMixedIn(sym): bool =
|
||||
let s = sym
|
||||
|
||||
@@ -137,4 +137,12 @@ block:
|
||||
static:
|
||||
assert hasIntSerKey
|
||||
assert strSerKey == "string"
|
||||
assert nestedItemDefVal == "Nimmers of the world, unite!"
|
||||
assert nestedItemDefVal == "Nimmers of the world, unite!"
|
||||
|
||||
block:
|
||||
template simpleAttr {.pragma.}
|
||||
|
||||
type Annotated {.simpleAttr.} = object
|
||||
|
||||
proc generic_proc[T]() =
|
||||
assert Annotated.hasCustomPragma(simpleAttr)
|
||||
Reference in New Issue
Block a user