-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed bug with interleaved typeapply and apply in extensions
- Loading branch information
Showing
6 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
compiler-plugin/testdata/set15pe/m9/TestExtDirectRefM9.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package cps.pe | ||
|
||
import org.junit.{Test,Ignore} | ||
import org.junit.Assert.* | ||
|
||
import scala.util.* | ||
|
||
|
||
import scala.annotation.experimental | ||
import scala.concurrent.* | ||
import scala.concurrent.duration.* | ||
|
||
import cps.* | ||
import cps.plugin.annotation.CpsDebugLevel | ||
import scala.concurrent.ExecutionContext.Implicits.global | ||
|
||
@experimental | ||
@CpsDebugLevel(20) | ||
class TestExtDirectRefM9: | ||
|
||
import cps.pe.directRef.* | ||
|
||
|
||
def runExtDirectRef(): PureEffect[String] = { | ||
implicit val printCode = cps.macros.flags.PrintCode | ||
implicit val debugLevel = cps.macros.flags.DebugLevel(20) | ||
async[PureEffect] { | ||
//val logger = PEToyLogger.make() | ||
val vs = PureEffect.directRef("AAAa") | ||
vs.set("0") | ||
//logger.log(vs.get) | ||
vs.get | ||
} | ||
} | ||
|
||
@Test def testExtFirectRefM9(): Unit = | ||
val c = runExtDirectRef() | ||
println(s"PE:extDirectRef, c=${c} ") | ||
val future = c.unsafeRunFuture().map{ vs => | ||
println(s"PE:extDirectRef, vs=${vs} ") | ||
assertTrue(vs=="0") | ||
} | ||
val r = Await.result(future,1.second) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters