Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "When can names already declared in the current block appear on the left of :=?" on CodeWiki (https://codewiki.com/practice/mcq/go/fundamentals/short-declaration-rule/).
Context (verbatim from the page):
"""
When can names already declared in the current block appear on the left of :=?
When at least one other non-blank name on the left is new in that block
Only when every name on the left already exists
Whenever the statement is inside an if block
Never; := requires every left-side name to be new
"""
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.