mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
@@ -157,7 +157,10 @@ proc mapTypeToAstX(cache: IdentCache; t: PType; info: TLineInfo;
|
||||
of tyObject:
|
||||
if inst:
|
||||
result = newNodeX(nkObjectTy)
|
||||
result.add t.sym.ast[2][0].copyTree # copy object pragmas
|
||||
if t.sym.ast != nil:
|
||||
result.add t.sym.ast[2][0].copyTree # copy object pragmas
|
||||
else:
|
||||
result.add newNodeI(nkEmpty, info)
|
||||
if t.sons[0] == nil:
|
||||
result.add newNodeI(nkEmpty, info)
|
||||
else: # handle parent object
|
||||
|
||||
@@ -201,3 +201,14 @@ test(MyObj):
|
||||
_ = object {.packed,myAttr,serializationKey: "one".}
|
||||
myField: int
|
||||
myField2: float
|
||||
|
||||
block t9600:
|
||||
type
|
||||
Apple = ref object of RootObj
|
||||
|
||||
macro mixer(x: typed): untyped =
|
||||
let w = getType(x)
|
||||
let v = getTypeImpl(w[1])
|
||||
|
||||
var z: Apple
|
||||
mixer(z)
|
||||
|
||||
Reference in New Issue
Block a user