Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "What must happen before a send on an unbuffered channel can complete?" on CodeWiki (https://codewiki.com/practice/mcq/go/checkpoint-3/checkpoint-3-unbuffered-channel/).
Context (verbatim from the page):
"""
What must happen before a send on an unbuffered channel can complete?
A corresponding receiver must be ready to receive the value.
The runtime must allocate a one-element buffer.
The sender must close the channel immediately after sending.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Go. Where you are unsure, say so.