New Issue: Using 'bool' as a vararg count causes internal error

20371, "DanilaFe", "Using 'bool' as a vararg count causes internal error", "2022-08-03T20:27:09Z"

Summary of Problem

I get the following compiler error:

bug.chpl:1: internal error: RES-EXP-RGS-0271 chpl version 1.28.0 pre-release (0)

Internal errors indicate a bug in the Chapel compiler ("It's us, not you"),
and we're sorry for the hassle.  We would appreciate your reporting this bug --
please see https://chapel-lang.org/bugs.html for instructions.  In the meantime,
the filename + line number above may be useful in working around the issue.

I expected to no get an internal error, though exactly how Chapel should behave with boolean vararg counts is something I cannot say. I was actually checking the compiler as a reference.

Steps to Reproduce

proc test(param n: bool, args ... n) {
    writeln(args);
}
test(true, true);

Compile command:

chpl bug.chpl

Configuration Information

chpl version 1.28.0 pre-release (0)
  built with LLVM version 14.0.6
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)

I'm using a from-source build while M1 homebrew builds are malfunctioning, but I'm pretty sure this happened on 1.27.0.