Skip to content

Fix errors on the Comp constructor taking the entire class as pos - #76

Open
Speedphoenix wants to merge 1 commit into
HeapsIO:masterfrom
Speedphoenix:fix-compctor-pos
Open

Fix errors on the Comp constructor taking the entire class as pos#76
Speedphoenix wants to merge 1 commit into
HeapsIO:masterfrom
Speedphoenix:fix-compctor-pos

Conversation

@Speedphoenix

Copy link
Copy Markdown
Contributor

At the moment this code yields the error h2d.Object should be Null<Float> For function argument 'parent', but highlights the error on the entire class.
image
This PR makes it so it only takes the pos of the constructor
image

The actual error is located in the runtime component generated code that does new ClassB(cast args[0], parent); because there's a wrong type inference on the constructor arguments. Using null on super's optional arguments or explicitly typing parent fixes the error.

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

Successfully merging this pull request may close these issues.

1 participant