KEMBAR78
Enable some `await` scenarios involving inline arrays by AlekseyTs · Pull Request #68129 · dotnet/roslyn · GitHub
Skip to content

Conversation

@AlekseyTs
Copy link
Contributor

@AlekseyTs AlekseyTs commented May 8, 2023

Relates to test plan #67826

@AlekseyTs AlekseyTs requested review from cston and jjonescz May 8, 2023 13:40
@AlekseyTs AlekseyTs requested a review from a team as a code owner May 8, 2023 13:40
@ghost ghost added the untriaged Issues and PRs which have not yet been triaged by a lead label May 8, 2023
@AlekseyTs
Copy link
Contributor Author

@cston, @jjonescz, @dotnet/roslyn-compiler Please review

@cston
Copy link
Contributor

cston commented May 8, 2023

static async Task<int> M1(C x) => x.F[await Task.FromResult(^10)];

Should this be ^await Task.FromResult(10) instead?


Refers to: src/Compilers/CSharp/Test/Semantic/Semantics/InlineArrayTests.cs:1698 in b159d40. [](commit_id = b159d40, deletion_comment = False)

@cston
Copy link
Contributor

cston commented May 8, 2023

static async Task<int> M1(C x) => GetC(x).F[GetRange()][await Task.FromResult(Get01(x))];

It looks like all the examples use Task.FromResult(). Does that mean these will execute synchronously? If so, consider testing one or more cases that execute asynchronously (perhaps with Task.Yield; for instance).


Refers to: src/Compilers/CSharp/Test/Semantic/Semantics/InlineArrayTests.cs:4262 in b159d40. [](commit_id = b159d40, deletion_comment = False)

@AlekseyTs
Copy link
Contributor Author

AlekseyTs commented May 9, 2023

static async Task<int> M1(C x) => x.F[await Task.FromResult(^10)];

Quite possible


In reply to: 1539174134


Refers to: src/Compilers/CSharp/Test/Semantic/Semantics/InlineArrayTests.cs:1698 in b159d40. [](commit_id = b159d40, deletion_comment = False)

@AlekseyTs
Copy link
Contributor Author

@cston I think I addressed your feedback

@AlekseyTs AlekseyTs merged commit 677a530 into dotnet:features/InlineArrays May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Inline Arrays untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants