mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
bugfix: tcan_inherit_generic works again
This commit is contained in:
@@ -92,7 +92,7 @@ proc InvalidGenericInst(f: PType): bool =
|
||||
|
||||
proc isPureObject(typ: PType): bool =
|
||||
var t = typ
|
||||
while t.sons[0] != nil: t = t.sons[0]
|
||||
while t.kind == tyObject and t.sons[0] != nil: t = t.sons[0]
|
||||
result = t.sym != nil and sfPure in t.sym.flags
|
||||
|
||||
proc getOrdValue(n: PNode): biggestInt =
|
||||
|
||||
8
tests/compile/tmacroaspragma.nim
Normal file
8
tests/compile/tmacroaspragma.nim
Normal file
@@ -0,0 +1,8 @@
|
||||
import macros
|
||||
|
||||
macro foo(x: stmt): stmt =
|
||||
echo treerepr(callsite())
|
||||
result = newNimNode(nnkStmtList)
|
||||
|
||||
proc zoo() {.foo.} = echo "hi"
|
||||
|
||||
Reference in New Issue
Block a user