Skip to content

Weight expressions aren't checked syntactially #88

@BenWeber42

Description

@BenWeber42

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglow-prioLow priority issue/tasksimpleLow in complexity and estimated timesmallRequires little effort/time

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions