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

Respect generated function invariants #163

Merged
merged 1 commit into from
Aug 11, 2019
Merged

Conversation

c42f
Copy link
Member

@c42f c42f commented Jul 5, 2019

Generated functions cannot call any function which might have a method
added after the generated function is defined. This means we need to
hoist such functions outside the generator, either by calling them
beforehand (as we do with axistrait), or ensuring that all methods are
defined before the generator (axisdim).

I belive this fixes #161 (test failures with precompiled-modules=no).

TODO

  • Check that the compiler is happy with the way I've hoisted axistrait() out of the generated function here.

Generated functions cannot call any function which might have a method
added after the generated function is defined. This means we need to
hoist such functions outside the generator, either by calling them
beforehand (as we do with axistrait), or ensuring that all methods are
defined before the generator (axisdim).

This fixes #161 (test failures with precompiled-modules=no).
@c42f c42f force-pushed the cjf/generated-function-fixes branch from 47005f0 to 8fe78ec Compare July 22, 2019 06:52
@timholy timholy merged commit 2f81a7a into master Aug 11, 2019
@timholy timholy deleted the cjf/generated-function-fixes branch August 11, 2019 07:26
@c42f
Copy link
Member Author

c42f commented Aug 13, 2019

Thanks Tim!

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.

Tests fail with --precompiled-modules=no
2 participants