Closed Youssef1313 closed 3 years ago
This is because Quoter uses an old version of Roslyn. When I updated it to 3.7.0 (and made few more changes required to make this work), I got:
CompilationUnit()
.WithMembers(
SingletonList<MemberDeclarationSyntax>(
NamespaceDeclaration(
IdentifierName("T"))
.WithMembers(
SingletonList<MemberDeclarationSyntax>(
RecordDeclaration(
Token(SyntaxKind.RecordKeyword),
Identifier("X"))
.WithModifiers(
TokenList(
Token(SyntaxKind.PublicKeyword)))
.WithOpenBraceToken(
Token(SyntaxKind.OpenBraceToken))
.WithCloseBraceToken(
Token(SyntaxKind.CloseBraceToken))))))
.NormalizeWhitespace()
I'm not sure what would be right thing to do here, considering that C# 9.0 is still in preview.
@svick I think it's reasonable to submit a PR with your changes.
Thanks @svick I used your change and updated to 3.8.0-3.final and used the language version Preview to get the latest features.
Input:
Result:
I'm not sure if this issue is on Roslyn's side or not. I have currently some PRs on Roslyn to update things for record's, but not also sure if they will fix that. So opening this so you can give it look.