Skip to content

[Bug]: creating a negative length tuple results in compiler hang #27064

@jabraham17

Description

@jabraham17

The following code results in the compiler hanging forever

var x: (-1)*int;

This should be a better error, saying negative length tuples are not allowed.

This can also occur in more subtle ways. The following program also hangs on compilation and should have a similar error

proc foo(param x): x*int where x == -1 {
  var tup: x*int;
  return tup;
}
foo(-1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions