forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translation for DelayedInit keeps more code in original class
As before, the translation for DelayedInit creates a closure-class. With this commit, its apply() method now just delegates to a synthetic method (in the original class) that contains the statements whose execution is to be delayed. Previously the closure body would have the statements in question transplanted into it, so to say, which in turn required creating accessors in the original class, as well as reformulating accesses-on-this into accesses-via-outer. Details about the mechanics of the rewriting can be found in the source comment for delayedEndpointDef()
- Loading branch information
1 parent
7211432
commit b4fbb7b
Showing
1 changed file
with
95 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters