You are right, i forgot to add the type casting. The less verbose version is to define a base proc and put there any common code for toolMethod: type A = ref object of RootRef i: int B = ref object of A c: char proc baseTest(a: A) = a.i = 1 method test(a: A) {.base.} = baseTest(a) method test(b: B) = baseTest(b) b.c = '1' let b = B() test(b) echo b[]
- Re: Base Class Methods Araq
- Re: Base Class Methods Arrrrrrrrr
- Re: Base Class Methods shrimp
- Re: Base Class Methods Arrrrrrrrr
- Re: Base Class Methods honhon
- Re: Base Class Methods shrimp