Skip to content

Commit 4bcefb2

Browse files
committed
Fix broken test code.
1 parent 85e939d commit 4bcefb2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

standard/patterns.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,11 @@ When a *pattern* appears on the right-hand-side of `is`, the extent of the patte
644644
> bool flag = true;
645645
>
646646
> // This is parsed as: (msg is (not int) or string)
647-
> result = msg is not int or string;
647+
> bool result = msg is not int or string;
648648
> Console.WriteLine($"msg (\"msg\"): msg is not int or string: {result}");
649649
>
650650
> // This is parsed as: (obj is (int or string)) && flag
651-
> bool result = obj is int or string && flag;
651+
> result = obj is int or string && flag;
652652
> Console.WriteLine($"obj (5), flag (true): obj is int or string && flag: {result}");
653653
>
654654
> // This is parsed as: (obj is int) || ((obj is string) && flag)
@@ -675,7 +675,6 @@ When a *pattern* appears on the right-hand-side of `is`, the extent of the patte
675675
> obj (5), flag (false): obj is int || obj is string && flag: True
676676
> ```
677677
>
678-
>
679678
> *end example*
680679
681680
## 11.3 Pattern subsumption

0 commit comments

Comments
 (0)