Skip to content

Commit

Permalink
fix Issue 4651 - Docs: Returned classes that have access to stack var…
Browse files Browse the repository at this point in the history
…iables of its enclosing function
  • Loading branch information
WalterBright committed Jan 24, 2012
1 parent eedb994 commit c58bfae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions class.dd
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ void func() {
}
------

$(V1
While a non-static nested class can access the stack variables
of its enclosing function, that access becomes invalid once
the enclosing function exits:
Expand Down Expand Up @@ -1105,6 +1106,7 @@ int test() {
return b.foo(); // Ok, using cached copy of func().m
}
------
)

$(P A $(I this) can be supplied to the creation of an
inner class instance by prefixing it to the $(I NewExpression):
Expand Down

0 comments on commit c58bfae

Please sign in to comment.