MyDeveloperDay added a comment.

In D115673#3191408 <https://reviews.llvm.org/D115673#3191408>, @curdeius wrote:

> LGTM. AFAIK (which is very limited when it comes to C#), the cases can have 
> also other expressions, not only ints and _. But that can be left for a 
> different patch.
> Example from 
> https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/pattern-matching
>
>   public State PerformOperation(Operation command) =>
>      command switch
>      {
>          Operation.SystemTest => RunDiagnostics(),
>          Operation.Start => StartSystem(),
>          Operation.Stop => StopSystem(),
>          Operation.Reset => ResetToReady(),
>          _ => throw new ArgumentException("Invalid enum value for command", 
> nameof(command)),
>      };

I thought that would be the case but actually I tried a load from the Microsoft 
docs and most where good, it seems to be the numerical ones that seems to be 
struggling.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115673/new/

https://reviews.llvm.org/D115673

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to