Skip to content

Commit

Permalink
zio 1.x upgrade to the latest
Browse files Browse the repository at this point in the history
add an example from scala/bug#12707
  • Loading branch information
tribbloid committed Dec 22, 2023
1 parent 09a43ee commit 5d2a8c1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies {
// testImplementation("${vs.scalaGroup}:scala-library:${vs.scalaV}")
testFixturesApi("com.chuusai:shapeless_${vs.scalaBinaryV}:2.3.7")

testFixturesApi("dev.zio:zio_${vs.scalaBinaryV}:1.0.4")
testFixturesApi("dev.zio:zio_${vs.scalaBinaryV}:1.0.18")

testFixturesApi("org.slf4j:slf4j-api:2.0.9")
testRuntimeOnly("org.slf4j:slf4j-simple:2.0.9")
Expand Down
23 changes: 23 additions & 0 deletions core/src/test/resources/splain/plugin/ZIOSpec/console/code.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import zio.*
import zio.console.Console

object Server {
type Pizza
type Broccoli

val start: ZIO[Console & Broccoli, Nothing, Unit] = {
val handler = (ServiceImpl.foo _).tupled
handler("blah", 1).unit
}
}

import Server.*

trait Service[-R] {
def foo(s: String, i: Int): ZIO[R, Nothing, String]
}

object ServiceImpl extends Service[Console & Pizza] {
def foo(s: String, i: Int) =
zio.console.putStrLn("blah").orDie.as("")
}
Empty file.
4 changes: 4 additions & 0 deletions core/src/test/scala/splain/plugin/ZIOSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ class ZIOSpec extends SpecBase.File {
// TODO: is it still incorrect?
checkError()
}

check("console", profile = Profile.Splain("-Xsource:3")) {
checkError()
}
}

0 comments on commit 5d2a8c1

Please sign in to comment.