| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Unfortunately I wasn't able to extract a test case, but the patch
has been tested to fix a problem on a real world code base.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The presentation compiler runs with `-Ymacro-expand:discard`, which
retains the macro expandee in the typechecked trees, rather than
substituting in the expansion. This mode was motivated as a means
to keep IDE functionality working (e.g. completion, navigation,
refactoring) inside macro applications.
However, if one has nested async macro applications, as reported in
the IDE ticket:
https://www.assembla.com/spaces/scala-ide/tickets/1002561
... the expansion of the outer async application was reporting
await calls enclosed by the inner async application.
This change tweaks the traversers used for this analysis to
stop whenever it sees an async.
|
|
|
|
|
| |
This avoids leaving .class files in the working directory
after running the test.
|
|
|
|
|
|
| |
By declararing the parameter of `async` as by-name.
Fixes #150 (the bug in the original ticket.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we blindly splicing `{..$stats, ..$generatedCode}`, and the last
expression in `$stats` is of type `Nothing`, we'll incur a dead
code warning when typechecking the block.
This commit:
- introduces a helper method to augment user-written stats with
synthetic code
- Emit a try/finally in that code (so we advance the state, even if we
are about to exit the state machine in the async-block global
exception handler
- Hide `Nothing` typed expressions from the dead code analysis
by wrapping them in an `expr: Any`
Fixes #150 (the part reported in the comments, not the original ticket.)
|
|
During the ANF transform, we were generating a tree of the shape:
{
val temp: Unit = await(futureOfUnit)
temp
()
}
I tried to simplifiy this to avoid creating the temporary value,
but this proved difficult as it would have required changes to
the subsequent state machine transformation.
Even replacing `temp` with `()` made the state machine transform
harder.
So for now, I've just inserted `temp.asInstanceOf[Unit]` to hide
from the compiler warning.
Fixes #74
|