Problem with is not pattern matching #4433
-
I have the following lines of code, where exp is a regular expression: ConvolutionKernel.Filter = (o) =>
{
if (exp == null)
return true;
if (!(o is KernelEntry aKernelEntry))
return false;
return (exp.IsMatch(aKernelEntry.Name));
}; Everything works fine, until I switch to the new ConvolutionKernel.Filter = (o) =>
{
if (exp == null)
return true;
if (o is not KernelEntry aKernelEntry)
return false;
return (exp.IsMatch(aKernelEntry.Name));
}; If condition |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Could you create a minimal sample to reproduce your issue, please? |
Beta Was this translation helpful? Give feedback.
-
This sounds like the codegen bug for In this case, you may try VS16.9 Preview or sharplab master to confirm. |
Beta Was this translation helpful? Give feedback.
This sounds like the codegen bug for
is not
in 16.8?In this case, you may try VS16.9 Preview or sharplab master to confirm.