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

Infer delegate types with -langversion:preview only #53241

Merged
merged 3 commits into from
May 12, 2021

Conversation

cston
Copy link
Member

@cston cston commented May 6, 2021

See #52448.
Test plan: #52192

@cston cston requested a review from a team as a code owner May 6, 2021 22:47
@jcouv jcouv added this to the C# 10 milestone May 6, 2021
@jcouv
Copy link
Member

jcouv commented May 7, 2021

        if (delegateOrFuncPtrType.SpecialType != SpecialType.System_Delegate)

Do we need to adjust this one too?


In reply to: 834049365


Refers to: src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs:1189 in 366686a. [](commit_id = 366686a, deletion_comment = False)

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 3) with one question

@cston
Copy link
Member Author

cston commented May 7, 2021

        if (delegateOrFuncPtrType.SpecialType != SpecialType.System_Delegate)

Do we need to adjust this one too?

I don't believe so, since this method should only be called in cases where Conversions.GetMethodGroupDelegateConversion() classified the conversion as a method group conversion, and GetMethodGroupDelegateConversion() checks that the feature is enabled.


In reply to: 834049365


Refers to: src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs:1189 in 366686a. [](commit_id = 366686a, deletion_comment = False)

@AlekseyTs
Copy link
Contributor

Infer delegate types with -langversion:preview only

Is this a permanent or a temporary change? It feels like it violates the general principle that language version doesn't affect result of semantic analysis, apart from diagnostics.

@cston
Copy link
Member Author

cston commented May 7, 2021

Is this a permanent or a temporary change? It feels like it violates the general principle that language version doesn't affect result of semantic analysis, apart from diagnostics.

This change is temporary and intended for early previews only.

@jcouv
Copy link
Member

jcouv commented May 7, 2021

This change is temporary and intended for early previews only.

Btw, I added a note to test plan as a reminder to revert this change (assuming it gets merged).

@cston
Copy link
Member Author

cston commented May 11, 2021

@dotnet/roslyn-compiler for a second review of a temporary change for early previews only.

@cston cston requested a review from a team May 12, 2021 16:20
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)

@cston cston merged commit 82ce937 into dotnet:features/compiler May 12, 2021
cston added a commit to cston/roslyn that referenced this pull request May 17, 2021
@cston cston modified the milestones: C# 10, 16.11 May 17, 2021
cston added a commit that referenced this pull request May 18, 2021
333fred added a commit to 333fred/roslyn that referenced this pull request May 20, 2021
…vice-featureslayer

* upstream/main: (857 commits)
  Update contrib documentation (dotnet#53504)
  SImplify
  Fix out of bound crash in lsp navto.
  Revert changes to TypeScriptWaitContext wrappers
  Switch to ROSLYN_TEST_CI for CI detection
  SImplify
  Simplify LoggerTestChannel using BlockingCollection
  Only require telemetry validation in CI
  Fix out of bound crash in lsp navto.
  Fix locked comment
  Update Compiler Test Plan.md (dotnet#53420)
  Adjust doc comment for NullableWalker.VisitConversion (dotnet#53429)
  Revert "Infer delegate types with -langversion:preview only (dotnet#53241)" (dotnet#53466)
  Fix syntax normalizer to add space around before colon in constructor initializer (dotnet#53326)
  Remove unnecessary property (dotnet#53406)
  EnC - Tell the debugger about updated type def tokens (dotnet#53217)
  Revert an error
  Update PublishData.json
  Keep trailing trivia so single line if statements don't get badly formatted (dotnet#53414)
  Fix dead test code (dotnet#53416)
  ...
cston added a commit to cston/roslyn that referenced this pull request Jul 29, 2021
cston added a commit that referenced this pull request Jul 29, 2021
Revert "Revert "Infer delegate types with -langversion:preview only (#53241)" (#53466)"

This reverts commit 7d461ed.
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.

3 participants