Skip to content

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Sep 6, 2023

@BillWagner
Copy link
Member Author

ping @adegeo for review

Contributes to dotnet#36356

One of the new compiler errors added for collection expressions is that collection expressions are not allowed in expression trees.

There are many features in the language that can't be used in expression trees. While adding this new error create a page to handle all the expression tree restrictions.
@BillWagner BillWagner force-pushed the collection-expression-errors branch from ff0ef9e to 950a6b7 Compare September 7, 2023 20:04
Copy link
Contributor

@adegeo adegeo left a comment

Choose a reason for hiding this comment

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

LGTM. Some minor things to consider.

Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
@BillWagner BillWagner enabled auto-merge (squash) September 7, 2023 20:34
@BillWagner BillWagner merged commit 3eb6117 into dotnet:main Sep 7, 2023
@BillWagner BillWagner deleted the collection-expression-errors branch September 7, 2023 20:38
IEvangelist pushed a commit to IEvangelist/docs that referenced this pull request Oct 2, 2023
* Combine and add expression tree restrictions

Contributes to dotnet#36356

One of the new compiler errors added for collection expressions is that collection expressions are not allowed in expression trees.

There are many features in the language that can't be used in expression trees. While adding this new error create a page to handle all the expression tree restrictions.

* fix typo in redirection

* edit pass and proofread

* run clean-repo to fix links.

* grammar check.

* Apply suggestions from code review

Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>

* Update docs/csharp/language-reference/compiler-messages/expression-tree-restrictions.md

---------

Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
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.

Issue in 'Compiler Error CS0854' docs

4 participants