-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax parameter-argument modifier matching for ref readonly parameters (
#68224) * Relax parameter-argument modifier matching * Remove sequence point verification * Adjust argument emit * Test more value kinds and argument modifiers * Simplify ref kind mismatch logic * Skip arglist arguments explicitly * Merge argument checking and coercion * Check feature availability before emitting mismatch warnings * Verify success interpolated string cases * Fix wrong error when overload resolution fails * Revert assert in argument ref kind emit * Remove a prototype comment about method conversions * Use warning level 1 * Revert argument expression passing to `GetEffectiveParameterRefKind` * Adjust wording of `WRN_BadArgRef` * Update patching comments in local rewriter * Lower `ref readonly` arguments to `in` ref kinds * Make a note to improve value kind error wording * Reduce ref kind assert before emit * Assert `ref readonly` params have ref kind before emit * Assert synthesized argument ref kinds * Fix `ref`/`in` pair error reporting logic * Store `ref readonly` temps same as `in` * Disallow `ref readonly` with none/`in` for old LangVersion * Fix `ref readonly` parameter value kind * Improve wording for rvalues passed to `ref readonly` * Add more value check tests * Improve assert code in synthesized constructor * Fix ref kinds default or empty assert * Suggest upgrading to `C#12` for `ref`/`in` error * Add separate error for readonly refs * Transform method ref kinds in synthesized calls * Skip arglist also in older LangVersion * Use non-strict ref kinds in synthesized calls * Ignore missing methods in an assert * Remove unnecessary `using` * Suggest upgrading on `ref`/`in` mismatch * Move local `argRefKind` closer to its use-site * Pass strict in ref kind to `StoreToTemp` * Improve nested ternary operator readability * Consider strict `in` during codegen * Make change consistent with `main` * Suppress `ref`/`in` warning for interpolated string handlers * Verify cross assembly scenarios in latest LangVersion * Move and extend interpolated string constructor diagnostic filtering * Handle one more interpolated string diagnostic collection
- Loading branch information
Showing
40 changed files
with
2,777 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.