Branch: refs/heads/main
Revision: 67d14e8
Author: mppf
Link: Minor adjustments to canParamCoerce by mppf · Pull Request #18683 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #18683 from mppf/add-missing-imag-conversion
Minor adjustments to canParamCoerce
This PR addresses two minor issues with canParamCoerce in the production
compiler that I noticed while porting it over to compiler/next in #18660.
-
Adds missing imag(32)->imag(64) implicit conversion. The spec clearly
indicates that this conversion should be present but to date it only
works for params. See also
Conversions — Chapel Documentation 1.25 -
Consider param string conversion to be a narrowing conversion. When
working with a param string, the compiler can implicitly convert it in
to c_string; and likewise for a param c_string into string. Since this
relies on the actual argument being a param (i.e. it does not allow
convertingvar x:string
into ac_string
implicitly), count it as a
narrowing conversion. I expect this to become irrelevant when we
deprecatec_string
.
Reviewed by @e-kayrakli - thanks!
-
[x] full local testing
Modified Files:
A test/types/imag/imag-conversion.chpl
A test/types/imag/imag-conversion.good
M compiler/resolution/functionResolution.cppCompare: Comparing 0560472f46b3...67d14e823711 · chapel-lang/chapel · GitHub