chapel icon indicating copy to clipboard operation
chapel copied to clipboard

Implement/improve error messages for misuse of `localAccess`

Open e-kayrakli opened this issue 6 months ago • 5 comments

  var Arr = [1,2,3];
  on Locales[1] {
    writeln(Arr.localAccess[0]);
  }

does not produce any error message with checks enabled, but it should.

Whereas

  use BlockDist;

  var Arr = blockDist.createArray(1..10, int);

  on Locales[1] {
    writeln(Arr.localAccess[1]);
  }

produces

$CHPL_HOME/drlocaltest.chpl:14: error: halt reached - array index out of bounds
note: index was 1 but array bounds are 6..10

which is better than no error message. However, ideally, we should not be reporting this as OOB.

e-kayrakli avatar Aug 13 '24 17:08 e-kayrakli