-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
unexpected stack overflow on ""'
#495
Comments
""'
""'
Note, this is almost certainly due to someone thinking they would be clever and mark the very-not-pure function |
As I mentioned in the relevant PR, that |
Just added PR JuliaLang/julia#25265, which solves the issue in this particular case. But is is a hack; I am not sure, if it is possible to find other types besides IMO, there is a design error, which is manifested in the following text: from https://github.com/JuliaLang/julia/blob/master/base/linalg/adjtrans.jl
Maybe we should define a new abstract type
Other types like |
That annotation must not exist (unless you enjoy very quickly getting the wrong answer or crashing). |
Again, please feel welcome to remove that annotation @vtjnash. Doing so falls outside the set of things I am focused on at the moment. Best! |
Much thanks for looking into and thinking about these issues @KlausC! :) The present wrapper design indeed has some limitations; some discussion of such limitations and associated tradeoffs exists in JuliaLang/julia#24969, e.g. the last paragraph in JuliaLang/julia#24969 (comment) and discussion elsewhere in that thread of opt-in versus opt-out behavior (similar in principle to what you suggest above). Best! |
There are some test cases broken - need rework. |
@vtjnash The call to if isdefined(Core, :Inference)
_default_eltype(itrt::ANY) = Core.Inference.return_type(first, Tuple{itrt})
else
_default_eltype(itr::ANY) = Any
end Does the |
No. Nospecialize is a compiler barrier and doesn’t affect inference. (Also, only one of several reasons this function isn’t pure) |
# note that Adjoint and Transpose must be able to wrap not only vectors and matrices
# but also factorizations, rotations, and other linear algebra objects, including
# user-defined such objects. so do not restrict the wrapped type.
struct Adjoint{T,S} <: AbstractMatrix{T}
parent::S
...
end @Sacha0 I might be wrong, but I'm wondering if it's better to have |
@andyferris I wondered the same at the outset, and continue to grapple with a few related design questions :). I initially constrained Re. allowing |
Yes I like this definition, rather than requiring an |
Almost certainly me thinking I was clever. See JuliaLang/julia#25274. |
A surprising way to trigger a surprising error:
The text was updated successfully, but these errors were encountered: