Hi,
can I have an object which inherits annotated with not nil?
I tried:
type Student* = ref object of RootObj not nil
and also
type Student* = ref object not nil of RootObj
both do not work as the compiler complains.
Greetings
Stefan
type
StudentObj = object of RootObj
Student* = ref StudentObj not nil
or:
type
StudentRef = ref object of RootObj
Student* = StudentRef not nil
Ah I see, thank you. I should have been able to come up with that myself.
Out of curiosity, is there a specific reason as to why it is not possible in one statement?