Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "correct" way to declare inheritable ref object #10195

yglukhov opened this issue Jan 4, 2019 · 0 comments


None yet
3 participants
Copy link

commented Jan 4, 2019

  FooInheritable = ref object {.inheritable.} # WARNING, but works!
  BarInheritable = ref object of FooInheritable

  InheritableFoo {.inheritable.} = ref object
  InheritableBar = ref object of InheritableFoo # ERROR.
test.nim(2, 31) Warning: type pragmas follow the type name; this form of writing pragmas is deprecated [Deprecated]
test.nim(6, 31) Error: inheritance only works with non-final objects; to enable inheritance write 'InheritableFoo of RootObj'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.