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

I introduced some ugly behavior with multi-arg version #27

Closed
pdeffebach opened this issue Apr 22, 2021 · 1 comment
Closed

I introduced some ugly behavior with multi-arg version #27

pdeffebach opened this issue Apr 22, 2021 · 1 comment

Comments

@pdeffebach
Copy link
Contributor

consider

julia> @chain 1 begin 
           first
           last
       end == 1
block = :(begin
          #= REPL[22]:2 =#
          first
          #= REPL[22]:3 =#
          last
      end == 1)
ERROR: MethodError: no method matching ==(::Int64, ::typeof(last), ::Int64)
Closest candidates are:

This error didn't exist until #24. Adding a multi-argument version of the macro means that it picks up the ending == at the end.

I don't know if there is a way around this, but I ran into it when writing tests for DataFramesMeta's block PR here.

@pdeffebach
Copy link
Contributor Author

Nevermind, I think this always existed and is defined for any macro.

This makes me feel better about the limitations of @tranform with :blocks

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

No branches or pull requests

1 participant