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

Object member variables of chugin types are not instantiated in constructor #449

Open
AndrewAday opened this issue Jun 29, 2024 · 1 comment

Comments

@AndrewAday
Copy link
Contributor

chugin.cpp

    QUERY->begin_class(QUERY, "Foo", "Object");
    QUERY->add_ctor(QUERY, foo_ctor);
    QUERY->add_mvar(QUERY, "int", "val", false);
    QUERY->end_class(QUERY);

    QUERY->begin_class(QUERY, "Bar", "Object");
    QUERY->add_ctor(QUERY, bar_ctor);
    QUERY->add_mvar(QUERY, "Foo", "foo", false);
    QUERY->end_class(QUERY);

test.ck

Bar b;  // bar_ctor is called, but never foo_ctor
<<< b.foo.val >>>;  // throws nullptr error. b.foo == NULL, foo was never instantiated
@AndrewAday
Copy link
Contributor Author

seems related to #447

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

1 participant