var arg is not needed since we are passing ref objects
This commit is contained in:
parent
f39a7b1af0
commit
ad9718badc
|
@ -99,7 +99,7 @@ type Cat = ref object of Animal
|
||||||
playfulness: float
|
playfulness: float
|
||||||
|
|
||||||
# A proc that can access and *modify* the object
|
# A proc that can access and *modify* the object
|
||||||
proc increase_age(self: var Cat) =
|
proc increase_age(self: Cat) =
|
||||||
self.age.inc()
|
self.age.inc()
|
||||||
|
|
||||||
var c = Cat(name: "Tom")
|
var c = Cat(name: "Tom")
|
||||||
|
|
Loading…
Reference in New Issue