Skip to content
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

Split BoundInterpolatedString into BoundInterpolatedString and BoundUnconvertedInterpolatedString #52061

Merged
merged 3 commits into from Mar 25, 2021

Conversation

333fred
Copy link
Member

@333fred 333fred commented Mar 23, 2021

This is intended to be a semantics-preserving refactoring that will make later work easier. When an interpolated string is first encountered, we now bind it as a BoundUnconvertedInterpolatedString node, and then when we bind to the natural type we convert it to a BoundInterpolatedString expression. Future code to allow it to convert to non-string types will take advantage of this in the conversion step.

…oundUnconvertedInterpolatedString`

This is intended to be a semantics-preserving refactoring that will make later work easier. When an interpolated string is first encountered, we now bind it as a `BoundUnconvertedInterpolatedString` node, and then when we bind to the natural type we convert it to a `BoundInterpolatedString` expression. Future code to allow it to convert to non-string types will take advantage of this in the conversion step.
@333fred 333fred requested a review from a team as a code owner March 23, 2021 00:11
@333fred 333fred requested a review from chsienki March 23, 2021 00:12
@333fred
Copy link
Member Author

333fred commented Mar 23, 2021

@chsienki for review.

@chsienki chsienki self-assigned this Mar 23, 2021
@AlekseyTs
Copy link
Contributor

AlekseyTs commented Mar 25, 2021

            ? Conversion.InterpolatedString : Conversion.NoConversion;

Should these conversions be allowed only from an unconverted form? #Closed


Refers to: src/Compilers/CSharp/Portable/Binder/Semantics/Conversions/Conversions.cs:87 in 01de52a. [](commit_id = 01de52a, deletion_comment = False)

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Mar 25, 2021

Done with review pass (commit 1) #Closed

@333fred
Copy link
Member Author

333fred commented Mar 25, 2021

@AlekseyTs addressed feedback.


In reply to: 807471528 [](ancestors = 807471528)

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (commit 3)

@333fred 333fred merged commit 17056f8 into dotnet:main Mar 25, 2021
@333fred 333fred deleted the literals branch March 25, 2021 23:24
@ghost ghost added this to the Next milestone Mar 25, 2021
333fred added a commit to 333fred/roslyn that referenced this pull request Mar 25, 2021
* upstream/main: (75 commits)
  Split BoundInterpolatedString into BoundInterpolatedString and BoundUnconvertedInterpolatedString (dotnet#52061)
  Combine VB comparers into one, and combine VB and C# comparers together (dotnet#51834)
  Use OptimizedVSCompletionList in LSP scenarios.
  F5 Hot Reload (dotnet#52101)
  Fix typescript shim
  Add tests for lazy syntax trees coming from the GeneratorDriver
  React to code review feedback.
  Simplify the lazy-initalization pattern used in GetRoot
  Remove an unnecessary override. (dotnet#52140)
  Update issue number (dotnet#52130)
  Enable CodeActions support for XAML using its own provider and CodeActionCache. The handlers are actually shared with Roslyn as is. (dotnet#52129)
  Add RestrictedIVT to dotnet watch to Features (dotnet#52087)
  Don't try to highlight operators (dotnet#52041)
  Use `null` instead of empty signature helps in LSP
  Use member type for relational pattern even in error cases (dotnet#51950)
  Update src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Extensions/SymbolExtensions.cs
  Use new QuickInfoUtilities helper
  Rebuild API shape (dotnet#52079)
  Added position parameter name
  Updated XAML QuickInfo to show more info like C# by using ISymbolDisplayService and adding more documentation parts.
  ...
@333fred 333fred mentioned this pull request Mar 25, 2021
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants