scala/async — pull request #67 by retronym (2014-03-27 13:46:46+00:00)
Title: Allow lazy vals without await in the initializer

We were incorrectly typechecking the `ClassDef` of the state machine
in the macro in a way that discarded the resulting trees, and only
kept around the symbol.

The led to the the macro engine retypechecking
that node, which somehow led to duplicated lazy val initiaializer
`DefDef`-s in the template, which manifest as a `VerifyError`.

This commit:

- rescues the typechecked `ClassDef` node from the eager
typechecking by the macro
- loosens the restriction on lazy vals in async blocks. They are
still prohibited if they contain an await on the RHS
- Adds a test that shows evalution is indeed lazy.

Review by @phaller. I will submit a separate PR against the 2.10.x branch.