Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2022-11-11 22:46:11 +0300
committergithub-actions <github-actions@github.com>2022-11-12 02:02:25 +0300
commit5fede793b77bd9add338c9dd6ded4e72a9d956cf (patch)
tree73eeff20226213d33ee491370e258be36bf6cbec
parent985a5adf4d3c7a29bf5d40d501c72641f91a9b0c (diff)
-rw-r--r--src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs b/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
index 24943ca441f..da7d936bed5 100644
--- a/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
+++ b/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
@@ -36,7 +36,7 @@ namespace System.Text.RegularExpressions.Generator
"#pragma warning disable CS0219 // Variable assigned but never used",
};
- private sealed record CompilationData(bool AllowUnsafe = false, bool CheckOverflow = false);
+ private record struct CompilationData(bool AllowUnsafe, bool CheckOverflow);
public void Initialize(IncrementalGeneratorInitializationContext context)
{
@@ -47,7 +47,7 @@ namespace System.Text.RegularExpressions.Generator
.Select((x, _) =>
x.Options is CSharpCompilationOptions options ?
new CompilationData(options.AllowUnsafe, options.CheckOverflow) :
- new CompilationData());
+ default);
// Produces one entry per generated regex. This may be:
// - Diagnostic in the case of a failure that should end the compilation