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

weird inheritance rule restriction #5231

Closed
jangko opened this issue Jan 17, 2017 · 0 comments
Closed

weird inheritance rule restriction #5231

jangko opened this issue Jan 17, 2017 · 0 comments

Comments

@jangko
Copy link
Contributor

jangko commented Jan 17, 2017

type
  Curve1[T, X] = object of RootObj
    a: T
    b: X
    
  Curve2[T] = Curve1[T, int]
  
  Curve3[T] = object of Curve2[T]

the above code trigger unexpected error:
curve.nim(8, 22) Error: inheritance only works with non-final objects

is this a bug or not? why inheritance not work with Curve2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants