Repository navigation
Implement interpolated strings via String.Concat #19971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f571df9
Lower string-typed interpolation to String.Concat (reflection-free)
charlesroddie 423d007
Add release notes for interpolated string String.Concat lowering
charlesroddie c7beb02
tidy
charlesroddie 1951198
Lower string interpolation by type-checking each part in place
charlesroddie 3d5bb3d
cleanup
charlesroddie 5eae16c
Pass a bare %s through as a string instead of via sprintf
charlesroddie b278961
%s is AOT compatible now
charlesroddie e83ddfb
Type-check formatted interpolation holes only once
charlesroddie 6112fd2
Lower bare %c/%d/%i/%M interpolation holes to String.Concat
charlesroddie 7d2a246
Check NativeAOT interpolated-string output against expected values
charlesroddie e87b12f
Add EmittedIL tests for interpolation cases not optimized before
charlesroddie 42e84bb
Merge remote-tracking branch 'upstream/main' into InterpolatedStringC…
charlesroddie c36ae55
Use the shared mkStringConcat helper for interpolation lowering
charlesroddie 930d2ad
Keep parens around a dangling hole with an alignment
charlesroddie 7163857
Accept a nullable string in a '%s' interpolation hole
charlesroddie 55d2c6b
Format ParseHelpers.fs
charlesroddie df0ef58
Update expected trimmed sizes for the interpolation codegen change
charlesroddie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Type-check formatted interpolation holes only once
The formatted/aligned hole path lowered via a synthesized String.Format that re-type-checked the hole expression a second time, which could duplicate an error in the hole and leak a spurious 'Format' overload-resolution error. Bind the already-checked, boxed hole value to a temporary and reference that from the synthesized String.Format instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Loading branch information
commit e83ddfb6f1636cedd5e49d813cd00687c4d32f29
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.