-
Notifications
You must be signed in to change notification settings - Fork 16
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
Incorrect handling of qualified function calls #19
Comments
@jkrumbiegel - this is actually problematic in JuliaData context, as some packages like CSV.jl or JSON3.jl do not export their functions. |
Ah yeah I figured this could become a problem. I have to think about it a bit, in which way this problem can be solved most cleanly. If this is just about adding logic so |
I guess we should allow things that can be resolved statically (during compile time), so:
has to be expaned to:
I guess and not to (you would have to write this explicitly to get the correct behavior):
|
DataFramesMeta's |
I don't think so. Currently, the rule is that an implicit first argument is only spliced in when the expression is a function call, a macro call, or a symbol in which case it's expanded to a function call. julia> dump(:(find_module_dynamically().func))
Expr
head: Symbol .
args: Array{Any}((2,))
1: Expr
head: Symbol call
args: Array{Any}((1,))
1: Symbol find_module_dynamically
2: QuoteNode
value: Symbol func The |
OK - you are right. I have not read the README.md carefully enough. However, I have to say that the rules when you do not have to write |
I have corrected the use of Additionally, this is hopefully a more informative error in the future: error(
"""Can't insert a first argument into:
$expr.
First argument insertion works with expressions like these, where [Module.SubModule.] is optional:
[Module.SubModule.]func
[Module.SubModule.]func(args...)
[Module.SubModule.]func(args...; kwargs...)
[Module.SubModule.]@macro
[Module.SubModule.]@macro(args...)
@. [Module.SubModule.]func
"""
) |
Thank you! |
This works:
but this fails:
and clearly
DataFrames.transform
is a qualified call.Is this documented? (I could not find a reference)
The text was updated successfully, but these errors were encountered: