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

Support C# 10 and .Net 6 #448

Closed
belav opened this issue Oct 11, 2021 · 0 comments · Fixed by #475
Closed

Support C# 10 and .Net 6 #448

belav opened this issue Oct 11, 2021 · 0 comments · Fixed by #475
Assignees
Milestone

Comments

@belav
Copy link
Owner

belav commented Oct 11, 2021

The following new syntax needs to be supported and properly formatted.

  1. Records struct/class
public readonly record struct Point(double X, double Y, double Z);
public readonly record class Point(double X, double Y, double Z);
  1. File-scoped namespace declaration
namespace MyNamespace;
  1. Extended property patterns
{ Prop1.Prop2: pattern }
// vs having to be
{ Prop1: { Prop2: pattern } }
  1. Global using directives
global using System;

The following may just work without any new formatting

  1. Allow AsyncMethodBuilder attribute on methods

The following work without any new formatting

  1. Struct - Parameterless constructors and field initializers
  2. A left-hand operand of the with expression can be of any structure type.
  3. Constant interpolated strings
  4. Record types can seal ToString
  5. Assignment and declaration in same deconstruction
@belav belav self-assigned this Oct 11, 2021
@belav belav added this to the 0.11.0 milestone Nov 15, 2021
@belav belav changed the title Support C# 10 Support C# 10 and .Net 6 Nov 15, 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 a pull request may close this issue.

1 participant