File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/content/docs/Language Common Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ fn void? test_read()
5757 {
5858 io::printfn("Excuse found: %s", excuse);
5959 // Returning Excuse using the `~` suffix
60- return excuse? ;
60+ return excuse~ ;
6161 }
6262
6363 // `read_buffer` behaves like a normal variable here
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ fn void? test()
7777 if (catch excuse = foo)
7878 {
7979 // Return the excuse with `~` operator
80- return excuse? ;
80+ return excuse~ ;
8181 }
8282 // Because the compiler knows 'foo' cannot
8383 // be empty here, it is unwrapped to non-Optional
@@ -106,7 +106,7 @@ fn void? test()
106106 int bar = maybe_function()!;
107107 // ✅ The above is equivalent to:
108108 // int? temp = maybe_function();
109- // if (catch excuse = temp) return excuse?
109+ // if (catch excuse = temp) return excuse~
110110
111111 // Now temp is unwrapped to a non-Optional
112112 int bar = temp; // ✅ This is OK
You can’t perform that action at this time.
0 commit comments