Open mppf opened 1 year ago
@mppf: This issue slipped past me when it was filed. Is it still relevant? What labels should be attached to it? (e.g., bug vs. 2.0?)
It's still relevant and it's related to #18214. I'm not sure what the program shown should do in terms of language design (so I'm not even sure if it's a bug).
However, it is not an issue for Chapel 2.0, because the compiler warns of unstable behavior in this case.
Summary of Problem
I am expecting that
R()
will run the type constructor for a generic recordR
, and that the type constructor has a default formal for each generic field with a default value. But, this does not seem to be happening for types that are generic but have defaults for some fields.Steps to Reproduce
Source Code:
I would expect that it output
Associated Future Test(s):
It's not technically a future, but PR #22718 added a warning for this case & a test of that warning
test/types/type_variables/ferguson/some-defaults-ignored.chpl