diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-11-25 17:55:47 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-11-26 16:18:28 +0100 |
commit | b9bd441662f1235ecd2f80e13030bfcd4f3c4c39 (patch) | |
tree | 403a019467f9442863a1e42b114de096f363d722 /src/test/scala/scala/async/run | |
parent | e2b840b96a16f7d41dc43c3cf6d905e0db568629 (diff) | |
download | scala-async-b9bd441662f1235ecd2f80e13030bfcd4f3c4c39.tar.gz scala-async-b9bd441662f1235ecd2f80e13030bfcd4f3c4c39.tar.bz2 scala-async-b9bd441662f1235ecd2f80e13030bfcd4f3c4c39.zip |
Synthesize an object implementing Function#apply and resume()
There is a fly in the ointment: any This() trees in the provided
code are getting rebound to this class. Sounds like more
resetAttrs fun ahead.
The object also serves as the Future {} thunk.
Diffstat (limited to 'src/test/scala/scala/async/run')
-rw-r--r-- | src/test/scala/scala/async/run/hygiene/Hygiene.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/scala/scala/async/run/hygiene/Hygiene.scala b/src/test/scala/scala/async/run/hygiene/Hygiene.scala index 0da2a4d..2aaf515 100644 --- a/src/test/scala/scala/async/run/hygiene/Hygiene.scala +++ b/src/test/scala/scala/async/run/hygiene/Hygiene.scala @@ -87,4 +87,17 @@ class HygieneSpec { } ext mustBe (14) } + +// @Test def `this reference is maintained`() { +// object Test { +// def blerg = 1 +// def check() { +// AsyncId.async { +// assert(this.blerg == 1) +// assert(this == Test, this.getClass) +// } +// } +// } +// Test.check() +// } } |