File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -885,14 +885,14 @@ class Option {
885
885
886
886
let val = Option.Some(5);
887
887
match(val) {
888
- when Object .Some(String and let a): console.log(` Got a string " ${a}" .` );
889
- when Object .Some(Number and let a): console.log(` Got a number ${a}.` );
890
- when Object .Some(...): console.log(` Got something unexpected.` );
891
- // Or ` Object .Some ` , either works.
892
- // ` Object .Some ()` will never match, as the return value
888
+ when Option .Some(String and let a): console.log(` Got a string " ${a}" .` );
889
+ when Option .Some(Number and let a): console.log(` Got a number ${a}.` );
890
+ when Option .Some(...): console.log(` Got something unexpected.` );
891
+ // Or ` Option .Some ` , either works.
892
+ // ` Option .Some ()` will never match, as the return value
893
893
// is a 1-item array, which doesn't match ` []`
894
- when Object .None(): console.log(` Operation failed.` );
895
- // or ` Object .None ` , either works
894
+ when Option .None(): console.log(` Operation failed.` );
895
+ // or ` Option .None ` , either works
896
896
default: console.log(` Didn' t get an Option at all.`)
897
897
}
898
898
```
You can’t perform that action at this time.
0 commit comments