-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix evaluating one/zero in generator body #8
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8 +/- ##
=========================================
+ Coverage 96.59% 96.6% +0.01%
=========================================
Files 13 13
Lines 675 677 +2
=========================================
+ Hits 652 654 +2
Misses 23 23
Continue to review full report at Codecov.
|
Heh.. was going to put you on review and you did it yourself 17 sec ago... Same wavelength brooo. |
I didn't look over the all the codebase - is this the only place that this kind of thing happens? Does it solve the |
No. |
Problem is here https://github.com/KristofferC/Tensors.jl/blob/49d600a05c07407f410bdf74ebe9eae444748929/src/constructors.jl#L42 I guess it is the same if the type is defined after that function ( |
Yeah, I saw that and it definitely raised some red flags in my mind, but I didn't exactly know what they were. It seemed a bit like the |
But it is weird because the Tensor type is defined at that point. We don't expect anyone to subtype these types so we should have it easier than StaticArrays. Anyway, I'm not sure what the difference is between first |
Unlike most of Julia code, the order of generated functions w.r.t. other method definitions is important, even if they are simultaneously loaded from the same file. Maybe shuffling the order of stuff could help. Not sure why |
Ref #9 Thanks for the tip! |
No worries. :) |
This should fix #7 cc @andyferris