New Issue: Internal compiler error when using 'owned aRecord' as a type actual.

20505, "DanilaFe", "Internal compiler error when using 'owned aRecord' as a type actual.", "2022-08-24T20:36:11Z"

Summary of Problem

I get an internal compiler error in the following code:

record r{}
record s { type t; }
var x: s(owned r);

It originally came up when I was trying to make a list of owned records, but seems like use in any type actual will do.
The error without developer mode is on line 3 (invalid code, by the way, since records cannot be owned). In debug mode, the compiler reports the following:

$CHPL_HOME/modules/internal/OwnedObject.chpl:433: internal error: assertion error [AST/DecoratedClassType.cpp:246]
Note: This source location is a guess.

Steps to Reproduce

Compile command:
chpl minimal-owned-record.chpl

Configuration Information

  • Output of chpl --version:
    chpl version 1.28.0 pre-release (dc228b96ba)
      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)
    
  • Output of $CHPL_HOME/util/printchplenv --anonymize:
    CHPL_TARGET_PLATFORM: darwin
    CHPL_TARGET_COMPILER: llvm
    CHPL_TARGET_ARCH: arm64
    CHPL_TARGET_CPU: native
    CHPL_LOCALE_MODEL: flat
    CHPL_COMM: none
    CHPL_TASKS: fifo
    CHPL_LAUNCHER: none
    CHPL_TIMERS: generic
    CHPL_UNWIND: none
    CHPL_MEM: cstdlib
    CHPL_ATOMICS: cstdlib
    CHPL_GMP: bundled
    CHPL_HWLOC: none
    CHPL_RE2: bundled
    CHPL_LLVM: system
    CHPL_AUX_FILESYS: none