Description
|
var regex = new Regex("""", timeout: TimeSpan.FromSeconds(10)); |
|
var regex = new Regex(timeout: TimeSpan.FromSeconds(10), pattern: """"); |
None of the constructors has a "timeout" parameter. I believe the test wanted to refer to this constructor, but the parameter was misspelled. I'm not sure though if the lack of options parameter is an intentional error scenario to test.
public Regex (string pattern, System.Text.RegularExpressions.RegexOptions options, TimeSpan matchTimeout);
@joperezr What was the intention here?
I discovered this while enabling validation of compiler diagnostics in tests.
Description
runtime/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/UpgradeToRegexGeneratorAnalyzerTests.cs
Line 48 in 671fe42
runtime/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/UpgradeToRegexGeneratorAnalyzerTests.cs
Line 59 in 671fe42
None of the constructors has a "timeout" parameter. I believe the test wanted to refer to this constructor, but the parameter was misspelled. I'm not sure though if the lack of
optionsparameter is an intentional error scenario to test.@joperezr What was the intention here?
I discovered this while enabling validation of compiler diagnostics in tests.