You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggested fix is to add a main function to the example source so that the intended error message (related to an unhandled error, I presume) is demonstrated.
The text was updated successfully, but these errors were encountered:
The source file contains a test declaration, so either its code should be moved to pub fn main, or the tested command should be zig test instead of zig build-exe.
An example in the Overview page is meant to show how
switch
requires exhaustive error checks. Instead, it shows that amain
function is required.https://ziglang.org/learn/overview/ (search for
15-errors-switch
)Suggested fix is to add a
main
function to the example source so that the intended error message (related to an unhandled error, I presume) is demonstrated.The text was updated successfully, but these errors were encountered: