Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which statement about deferred calls is correct?" on CodeWiki (https://codewiki.com/practice/mcq/go/checkpoint-2/checkpoint-2-defer-order/).
Context (verbatim from the page):
"""
Which statement about deferred calls is correct?
Direct call arguments are evaluated when `defer` executes, and deferred calls later run in last-in, first-out order.
Arguments are first evaluated when the surrounding function returns, in first-in, first-out order.
Deferred calls run only on normal return, never during panic unwinding.
"""
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.