@@ -582,22 +582,32 @@ When a *pattern* is used with `is`, any pattern operators in that *pattern* have
582582>
583583> // This is parsed as: (obj is (int or string)) && flag
584584> bool result = obj is int or string && flag ;
585- > Console .WriteLine ($" obj (5), flag (true): obj is int or string && flag: {result }" ); // True
585+ > Console .WriteLine ($" obj (5), flag (true): obj is int or string && flag: {result }" );
586586>
587587> // This is parsed as: (obj is int) || ((obj is string) && flag)
588588> result = obj is int || obj is string && flag ;
589- > Console .WriteLine ($" obj (5), flag (true): obj is int || obj is string && flag: {result }" ); // True
589+ > Console .WriteLine ($" obj (5), flag (true): obj is int || obj is string && flag: {result }" );
590590>
591591> flag = false ;
592592> // This is parsed as: (obj is (int or string)) && flag
593593> result = obj is int or string && flag ;
594- > Console .WriteLine ($" obj (5), flag (false): obj is int or string && flag: {result }" ); // False
594+ > Console .WriteLine ($" obj (5), flag (false): obj is int or string && flag: {result }" );
595595>
596596> // This is parsed as: (obj is int) || ((obj is string) && flag)
597597> result = obj is int || obj is string && flag ;
598- > Console .WriteLine ($" obj (5), flag (false): obj is int || obj is string && flag: {result }" ); // True
598+ > Console .WriteLine ($" obj (5), flag (false): obj is int || obj is string && flag: {result }" );
599599> ```
600600>
601+ > The output produced is
602+ >
603+ > ```console
604+ > True
605+ > True
606+ > False
607+ > True
608+ > ```
609+ >
610+ >
601611> *end example *
602612
603613## 11.3 Pattern subsumption
0 commit comments