Skip to content

Commit

Permalink
Limit int->uint conversion unstable warnings to user code (without ot…
Browse files Browse the repository at this point in the history
…her flags) (chapel-lang#23453)

[reviewed by @mppf]

Prior to this change, 3 tests in `release/examples` included these
messages for code that was within the standard/internal modules
(ChapelRange, IO). We want unstable warnings to only fire in user code
unless `--warn-unstable-internal` or `--warn-unstable-standard` are also
passed, so limit this message.

Passed a full paratest with futures
  • Loading branch information
lydia-duncan authored Sep 19, 2023
2 parents e549b12 + cd89522 commit db251d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/resolution/functionResolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8129,7 +8129,7 @@ void warnForIntUintConversion(BaseAST* context,
Type* formalType,
Type* actualType,
Symbol* actual) {
if (fWarnIntUint || fWarnUnstable) {
if (fWarnIntUint || shouldWarnUnstableFor(context)) {
Type* formalVt = formalType->getValType();
Type* actualVt = actualType->getValType();
if (is_uint_type(formalVt) && is_int_type(actualVt)) {
Expand Down

0 comments on commit db251d3

Please sign in to comment.