www.ziglang.org icon indicating copy to clipboard operation
www.ziglang.org copied to clipboard

/learn/overview/15-errors-switch gives "no member named 'main'"

Open softmoth opened this issue 1 year ago • 0 comments

An example in the Overview page is meant to show how switch requires exhaustive error checks. Instead, it shows that a main 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.

softmoth avatar Sep 23 '24 15:09 softmoth