New Issue: Compiling loop that assigns 'none' to array of 'nothings' triggers assertion in resolution/cleanups.cpp

19534, "stonea", "Compiling loop that assigns 'none' to array of 'nothings' triggers assertion in resolution/cleanups.cpp", "2022-03-23T20:51:37Z"

Summary of Problem

Assigning none to an array of nothings produces an error. This is obviously contrived, but hey why shouldn't this work?:

Steps to Reproduce

Source Code:

param N=100;
var A : [0..<N] nothing;
for i in 0..<N do A[i] = none;

Compile command:

chpl foo.chpl -o foo

With CHPL_DEVELOPER set it will produce this error:
internal error: assertion error [resolution/cleanups.cpp:765]

Configuration Information

$ chpl --version
chpl version 1.26.0.b558a9ef18
  built with LLVM version 11.1.0
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
$ $CHPL_HOME/util/printchplenv --anonymize
CHPL_TARGET_PLATFORM: darwin
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: system
CHPL_AUX_FILESYS: none