Skip to content

Conversation

@retronym
Copy link
Member

A no-op merge; only backports and build updates on the
2.10.x branch.

retronym and others added 16 commits March 10, 2014 09:35
Works on the 2.10.x branch, so just backprting the test.

Cherry picked from 6f6546e.
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.

(cherry picked from commit cc4587b)

Conflicts:
	src/main/scala/scala/async/internal/AsyncAnalysis.scala
	src/main/scala/scala/async/internal/AsyncTransform.scala
  - remove unneeded `setType(NoType)`, which was leftover from my
    first attempts to find this bug.
  - fix typo in error message
  - optimize imports

(cherry picked from commit 5c6ea29)
[backport] Allow lazy vals without await in the initializer
	% export MB=$(git merge-base head origin/2.10.x)

	% git log --oneline --graph $MB..origin/2.10.x
	*   9b3bbe4 Merge pull request scala#69 from retronym/backport/ticket/52-lazy-val
	|\
	| * cf19f02 Incorporate pull request feedback
	| * ee66e08 [backport] Allow lazy vals without await in the initializer
	|/
	* 6808ce4 0.9.1-SNAPSHOT
	* a37cf65 0.9.0
	* 8f9a0b1 Update to Scala 2.10.4
	* b489738 0.9.0-SNAPSHOT
	* 5c83eb1 0.9.0-M6
	* be38163 [backport] Test case for "not a class" crasher in live variable
	* 290c3be Fix substitution in release script message
	* c3384d8 Update release script for _2.10 tagging convention
	* e3027b1 Update version in README
	* 6b344fa 0.9.0-SNAPSHOT
	* 8fafd79 0.9.0-M5
	* d76bd53 only build 2.10.x on this branch

	% git merge -s ours origin/2.10.x
@retronym
Copy link
Member Author

% export MB=$(git merge-base head origin/2.10.x)

% git log --oneline --graph $MB..origin/2.10.x
*   9b3bbe4 Merge pull request #69 from retronym/backport/ticket/52-lazy-val
|\
| * cf19f02 Incorporate pull request feedback
| * ee66e08 [backport] Allow lazy vals without await in the initializer
|/
* 6808ce4 0.9.1-SNAPSHOT
* a37cf65 0.9.0
* 8f9a0b1 Update to Scala 2.10.4
* b489738 0.9.0-SNAPSHOT
* 5c83eb1 0.9.0-M6
* be38163 [backport] Test case for "not a class" crasher in live variable
* 290c3be Fix substitution in release script message
* c3384d8 Update release script for _2.10 tagging convention
* e3027b1 Update version in README
* 6b344fa 0.9.0-SNAPSHOT
* 8fafd79 0.9.0-M5
* d76bd53 only build 2.10.x on this branch

% git merge -s ours origin/2.10.x

retronym added a commit that referenced this pull request Mar 27, 2014
@retronym retronym merged commit f53c3bb into scala:master Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants