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
@@ -5240,13 +5240,16 @@ <h3 id="Defer_statements">Defer statements</h3>
5240
5240
</ p >
5241
5241
5242
5242
< p >
5243
- Each time the "defer" statement
5243
+ Each time a "defer" statement
5244
5244
executes, the function value and parameters to the call are
5245
5245
< a href ="#Calls "> evaluated as usual</ a >
5246
- and saved anew but the actual function body is not executed .
5247
- Instead, deferred functions are executed immediately before
5246
+ and saved anew but the actual function is not invoked .
5247
+ Instead, deferred functions are invoked immediately before
5248
5248
the surrounding function returns, in the reverse order
5249
5249
they were deferred.
5250
+ If a deferred function value evaluates
5251
+ to < code > nil</ code > , execution < a href ="#Handling_panics "> panics</ a >
5252
+ when the function is invoked not when the "defer" statement is executed.
5250
5253
</ p >
5251
5254
5252
5255
< p >
You can’t perform that action at this time.
0 commit comments