aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/scala/async/run/WarningsSpec.scala
Commit message (Collapse)AuthorAgeFilesLines
* fix procedure syntaxxuwei-k2018-05-091-3/+3
|
* copyright 2018 LightbendSeth Tisue2018-02-061-1/+1
|
* Fix ANF transform for corner case in late transformsJason Zaugg2017-09-291-1/+1
| | | | | 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.
* Avoid spurious "illegal await" error in IDE with nestingJason Zaugg2015-10-091-0/+20
| | | | | | | | | | | | | | | | | | | 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.
* Stop test compiler before code generationJason Zaugg2015-07-301-3/+3
| | | | | This avoids leaving .class files in the working directory after running the test.
* Avoid dead code warning with async(throw T)Jason Zaugg2015-07-291-0/+19
| | | | | | By declararing the parameter of `async` as by-name. Fixes #150 (the bug in the original ticket.)
* Avoid dead code warnings in generated code.Jason Zaugg2015-07-291-3/+26
| | | | | | | | | | | | | | | | | 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.)
* Avoid compiler warning when awaiting Future[Unit]Jason Zaugg2015-07-071-0/+35
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