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

Interpolation & scope #64

Open
mcabbott opened this issue Nov 11, 2022 · 1 comment · May be fixed by #74
Open

Interpolation & scope #64

mcabbott opened this issue Nov 11, 2022 · 1 comment · May be fixed by #74
Labels
bug Something isn't working

Comments

@mcabbott
Copy link
Owner

As I was reminded here https://discourse.julialang.org/t/in-using/90056/5 this package tends to assume that the name TensorCast is in scope where the macro runs. It shouldn't.

@mcabbott mcabbott added the bug Something isn't working label Nov 11, 2022
@tpapp
Copy link

tpapp commented Nov 11, 2022

Thanks for opening an issue. An MWE is

using TensorCast: @cast
B = ones(3, 3)
@cast A[row][col] := B[row, col]

I think that wrapping each function form f(args...) in $(f(args...)) in the macro implementation should fix this, but didn't test.

In addition, it would be great to clarify that is just a placeholder and does not need to be imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants