New Issue: Operator methods and promotion do not play nicely

17218, "lydia-duncan", "Operator methods and promotion do not play nicely", "2021-02-22T16:52:39Z"

Summary of Problem

Operator methods cause an internal compiler error when used in a promoted setting.

Steps to Reproduce

Source Code:

record Foo {
  var x: int;
}
operator Foo.==(lhs: Foo, rhs: Foo) {
  return lhs.x == rhs.x;
}
proc main() {
  var arr1: [0..3] Foo;
  var arr2: [0..3] Foo;
  writeln(arr1 == arr2);
}

Compile command:
chpl foo.chpl

Associated Future Test(s):
test/functions/operatorOverloads/operatorMethods/promotedCall.chpl #TBD

Configuration Information

  • Output of chpl --version: chapel 1.24.0 (pre-release)