From f6a5c93acb7628c4d169b778e386332c6d1bd99b Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 27 Jul 2015 12:59:56 +1000 Subject: [PATCH 1/2] Update SBT for the warn command, now assumed by sbt-extras --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 0974fce4..a6e117b6 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.0 +sbt.version=0.13.8 From a037da192dbea32cffa8c5c8d33e7c56af0c353f Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 27 Jul 2015 12:22:21 +1000 Subject: [PATCH 2/2] Avoid leaking untyped trees out of macro The stack trace and bisection in #119 made me notice that we are failing to typecheck the cast we generated in the fix for #74. The ticket doesn't have a reproduction, so I'm submitting this without a test case. Fixes #119 --- src/main/scala/scala/async/internal/AnfTransform.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scala/async/internal/AnfTransform.scala b/src/main/scala/scala/async/internal/AnfTransform.scala index 585f3882..b0774e35 100644 --- a/src/main/scala/scala/async/internal/AnfTransform.scala +++ b/src/main/scala/scala/async/internal/AnfTransform.scala @@ -59,7 +59,7 @@ private[async] trait AnfTransform { // TODO avoid creating a ValDef for the result of this await to avoid this tree shape altogether. // This will require some deeper changes to the later parts of the macro which currently assume regular // tree structure around `await` calls. - gen.mkCast(ref, definitions.UnitTpe) + api.typecheck(atPos(tree.pos)(gen.mkCast(ref, definitions.UnitTpe))) else ref stats :+ valDef :+ atPos(tree.pos)(ref1)