You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inverted defined in CharacterClass will return CharacterClass. But the compiler is emitting an error for it.
leta0=OneOrMore(.anyOf("a"))// ✅leta1=OneOrMore(.anyOf("a").inverted)// ❌(Unexpected) Member 'inverted' in 'CharacterClass' produces result of type 'RegexComponent', but context expects 'CharacterClass'leta2=OneOrMore(CharacterClass.anyOf("a").inverted)// ✅
The text was updated successfully, but these errors were encountered:
Looks like this is an issue on the swift Compiler side. I think it was matched to Anchor.inverted which lead to the problem. But actually .anyOf will only return CharacterClass
I have not! Looks like there might be some interference between SE-0287 and SE-0299? I'll try a reduced example.
Edit: This is pretty much the RegexBuilder setup, but doesn't reproduce the problem. Am I missing something? We don't even have the Anchor extension methods that would allow it to be selected in that some RegexComponent context.
inverted
defined inCharacterClass
will returnCharacterClass
. But the compiler is emitting an error for it.The text was updated successfully, but these errors were encountered: