Compare commits

..

No commits in common. "fix_oop" and "master" have entirely different histories.

View file

@ -105,12 +105,12 @@ macro class*(head, body: untyped): untyped =
# Empty
# create a type section in the result
if exported:
result =
result =
if exported:
# mark `typeName` with an asterisk
quote do:
type `typeName`* = ref object of `baseName`
else:
result =
else:
quote do:
type `typeName` = ref object of `baseName`
@ -167,8 +167,8 @@ macro class*(head, body: untyped): untyped =
# specify the return type of the ctor proc
node.params[0] = typeName
else:
# inject `this: T` into the arguments
node.params.insert(1, newIdentDefs(ident("this"), typeName))
# inject `self: T` into the arguments
node.params.insert(1, newIdentDefs(ident("self"), typeName))
result.add(node)
of nnkVarSection: