File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
<!--{
2
2
"Title": "The Go Programming Language Specification",
3
- "Subtitle": "Version of August 28 , 2014",
3
+ "Subtitle": "Version of September 19 , 2014",
4
4
"Path": "/ref/spec"
5
5
}-->
6
6
@@ -5243,13 +5243,16 @@ <h3 id="Defer_statements">Defer statements</h3>
5243
5243
</ p >
5244
5244
5245
5245
< p >
5246
- Each time the "defer" statement
5246
+ Each time a "defer" statement
5247
5247
executes, the function value and parameters to the call are
5248
5248
< a href ="#Calls "> evaluated as usual</ a >
5249
- and saved anew but the actual function body is not executed .
5250
- Instead, deferred functions are executed immediately before
5249
+ and saved anew but the actual function is not invoked .
5250
+ Instead, deferred functions are invoked immediately before
5251
5251
the surrounding function returns, in the reverse order
5252
5252
they were deferred.
5253
+ If a deferred function value evaluates
5254
+ to < code > nil</ code > , execution < a href ="#Handling_panics "> panics</ a >
5255
+ when the function is invoked not when the "defer" statement is executed.
5253
5256
</ p >
5254
5257
5255
5258
< p >
You can’t perform that action at this time.
0 commit comments