Skip to content

Negative Integers Passed to Fuzzers in Next Lines Lead to Syntax Error #1180

@keyan-m

Description

@keyan-m

What Git revision are you using?

aiken v1.1.17+c3a7fba

What operating system are you using, and which version?

  • Linux / Ubuntu
  • Linux / Other
  • macOS
  • Windows

Describe what the problem is?

It seems when an argument of a fuzzer in a test is declared in the next line (with respect to the fuzzer itself), and this argument is a negative integer, it turns into a syntax error.

Reproduction snippet:

test success_scenario(
  x via fuzz.int_between(
    -999999999999999999999999,
    999999999999999999999999,
  ),
) {
  // ...
}

This leads to:

  × While parsing files...
  ╰─▶ I found an unexpected token '↳-'.

The integers' lengths are not entirely relevant, but I encountered this because formatter sent them to the next lines.

This is easily avoidable by using consts of course, but there could be other cases that are affected by this.

What should be the expected behavior?

This shouldn't lead to a syntax error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    🔨 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions