-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
42 additions
and
25 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
23 changes: 0 additions & 23 deletions
23
core/src/test/resources/splain/plugin/ZIOSpec/console/code.scala
This file was deleted.
Oops, something went wrong.
Empty file.
26 changes: 26 additions & 0 deletions
26
core/src/test/resources/splain/plugin/ZIOSpec/source3/code.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,26 @@ | ||
import zio.* | ||
import zio.console.Console | ||
|
||
object source3 { | ||
|
||
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("") | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
core/src/test/resources/splain/plugin/ZIOSpec/source3/error
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,14 @@ | ||
newSource1.scala:12: error: type mismatch; | ||
zio.ZIO[ | ||
source3.Server.Pizza┃source3.Server.Broccoli with | ||
zio.Has[zio.console.Console.Service], | ||
Nothing, | ||
Unit | ||
] | ||
handler("blah", 1).unit | ||
^ | ||
newSource1.scala:23: error: under -Xsource:3, inferred zio.ZIO[zio.console.Console with source3.Server.Pizza,Nothing,String] instead of zio.ZIO[zio.console.Console,Nothing,String] [quickfixable] | ||
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings. | ||
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=source3.ServiceImpl.foo | ||
def foo(s: String, i: Int) = | ||
^ |
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