Open
Description
Summary of Problem
Given a fully-defaulted generic type, like:
record R {
param x: int = 42;
}
we typically treat R
as a "complete" type, which is to say, nothing more is unbound or generic about it, equivalent to R(42)
. However, today I was finding that when declaring a type alias with a conditional, like:
type t = if test then R else R;
the compiler would treat t
as generic. Meanwhile, for a simple case like:
type t = R;
the compiler treated t
as non-generic (i.e., simply using a type alias to refer to the complete type did not seem to be the issue).
Steps to Reproduce
Source Code:
Associated Future Test(s):
test/types/records/generic/typeAliasFullyDefaultedGeneric.chpl
#26137
Configuration Information
- Output of
chpl --version
: `chpl version 2.2.0