New Issue: const checking error with list.first and list.last

17259, "mppf", "const checking error with list.first and list.last", "2021-02-24T22:11:30Z"

Summary of Problem

I'm seeing a surprising const checking error when calling .first or last on a const ref list:

Steps to Reproduce

Source Code:

use List;

proc f(args: list(string)) {
  var lower = args.first().toLower();
  // error is not present with this variant:
  //var lower = args[0].toLower();
  writeln(lower);
}

proc main() {
  var args: list(string);
  args.append("HI");

  f(args);
}

Associated Future Test(s):

none yet