Dont add base pragma for PhysicsBody methods

This commit is contained in:
Ruslan Mustakov 2017-08-08 19:13:51 +07:00
commit 4b6c76e776

View file

@ -603,7 +603,8 @@ proc doGenerateMethod(tree: PNode, methodBindRegistry: var HashSet[string],
pragma.add(ident("gcsafe")) pragma.add(ident("gcsafe"))
pragma.add(newNode(nkExprColonExpr).addChain(ident("locks"), pragma.add(newNode(nkExprColonExpr).addChain(ident("locks"),
newIntLit(0))) newIntLit(0)))
if isVirtual and isBase: if isVirtual and isBase and typ.name != "PhysicsBody":
# Nim doesn't like `base` on PhysicsBody methods - wtf
pragma.add(ident("base")) pragma.add(ident("base"))
procDecl.sons[4] = pragma procDecl.sons[4] = pragma
tree.add(procDecl) tree.add(procDecl)