SharpLab
SharpLab copied to clipboard
Partial method 'RegexExtensions.IsABC()' must have an implementation part because it has accessibility modifiers.
I'm trying to see the generated code using the new GeneratedRegex in .NET 7
using System.Text.RegularExpressions;
public static partial class RegexExtensions {
[GeneratedRegex($@"[abc]")]
public static partial Regex IsABC();
}
But I get the following error:
error CS8795: Partial method 'RegexExtensions.IsABC()' must have an implementation part because it has accessibility modifiers.
Is there anything funky needed to support generators like this?
Interesting, thanks for reporting! I would guess generators do need some extra setup that SharpLab does not have yet. I'll take a look when I have a moment.
+1. Not sure if this is relevant to the service itself, or for the dotnet.
after a year, is there any thing new on this ?