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

Weight expressions aren't checked syntactially #88

Open
BenWeber42 opened this issue Jul 21, 2021 · 0 comments
Open

Weight expressions aren't checked syntactially #88

BenWeber42 opened this issue Jul 21, 2021 · 0 comments
Labels
bug Something isn't working low-prio Low priority issue/task simple Low in complexity and estimated time small Requires little effort/time
Milestone

Comments

@BenWeber42
Copy link
Contributor

This code will crash dusk:

@stencil
def invalid_weights_expression(a: Field[Edge], b: Field[Cell]) -> None:
  with domain.upwards:
    a = sum_over(Edge > Cell, b, weights=[1, -1]/2)

The check is missing here:

weights = [self.expression(weight) for weight in kwargs["weights"].elts]

(kwargs["weights"] needs to be checked syntactially)

@BenWeber42 BenWeber42 added bug Something isn't working low-prio Low priority issue/task simple Low in complexity and estimated time small Requires little effort/time labels Jul 21, 2021
@BenWeber42 BenWeber42 added this to the Version 0.6 milestone Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low-prio Low priority issue/task simple Low in complexity and estimated time small Requires little effort/time
Projects
None yet
Development

No branches or pull requests

1 participant