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

Type field object not initialized properly for inherited objects #7930

Open
dandevelo opened this issue May 31, 2018 · 1 comment
Open

Type field object not initialized properly for inherited objects #7930

dandevelo opened this issue May 31, 2018 · 1 comment

Comments

@dandevelo
Copy link
Contributor

More details here:

https://forum.nim-lang.org/t/3875

@jangko
Copy link
Contributor

jangko commented Jun 1, 2018

there is no way for the compiler to auto initialize ptr object if it not allocated first.

here is my proposal(in no particular order or preference):

  1. accept @GULPF answer as standard practice, and put it into doc/manual
  2. fix system.create/system.createShared to initialize ptr object and put it into doc/manual
  3. create new/newShared similar with C++ resulting in initialized ptr object and put it into doc/manual
  4. if this issue considered as a bug, we can fix ptr object contruction behave like ref object construction except it need to be manually freed/deallocated.
  5. point number 1,2,3,4 can coexist together without conflict.

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

No branches or pull requests

2 participants