Error on compilation with function using exception filter

Using Plcnext 2022.9 the following code is successfully compiled with visual studio and the generated pcwlx can be imported into plcnext engineer but building fail with error E3004 : evaluation stack corrupted

catch (IOException ioex) when (ioex.InnerException is SocketException)
{
       Console.WriteLine("QueryDataFromClimats IOException: SocketException errorcode {0}", ((SocketException)ioex.InnerException).ErrorCode);
}
Code not using when filter is successfully compiled by plcnext engineer.
 catch (IOException ioex)// when (ioex.InnerException is SocketException)
      {
        if(ioex.InnerException is SocketException)
        {
          Console.WriteLine("QueryDataFromClimats IOException: SocketException errorcode {0}", ((SocketException)ioex.InnerException).ErrorCode);
        } 

Regards Alexandre

Hello Alexandre,
I have provided your report to development and the issue will be investigated. I assume it is a compiler error. Could you send me a short feedback, wich Template/Language you are using?
I assume it is C# eCLR (provided with PLCnext C# Template in VS).
Thanks & Best Regards
Eduard

Hello Alexandre,
I got the information from development, that the generated CIL-code for the “when” modifier is not supported by the eCLR backend compiler. The constraints section of eCLR-Programming-Reference.chm will be extended concerning this issue.
BR Eduard