From 15ba087cb5d42b7b96775d4250095e6c9e171acd Mon Sep 17 00:00:00 2001 From: peng Date: Wed, 31 Jan 2024 15:06:04 -0500 Subject: [PATCH] ZIOSpec source3 test has to be removed for inconsistency over supported scala versions --- .../splain/plugin/ZIOSpec/source3/code.scala | 26 ------------------- .../splain/plugin/ZIOSpec/source3/error | 14 ---------- .../test/scala/splain/plugin/ZIOSpec.scala | 4 --- 3 files changed, 44 deletions(-) delete mode 100644 core/src/test/resources/splain/plugin/ZIOSpec/source3/code.scala delete mode 100644 core/src/test/resources/splain/plugin/ZIOSpec/source3/error diff --git a/core/src/test/resources/splain/plugin/ZIOSpec/source3/code.scala b/core/src/test/resources/splain/plugin/ZIOSpec/source3/code.scala deleted file mode 100644 index 806e1cd..0000000 --- a/core/src/test/resources/splain/plugin/ZIOSpec/source3/code.scala +++ /dev/null @@ -1,26 +0,0 @@ -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("") - } -} diff --git a/core/src/test/resources/splain/plugin/ZIOSpec/source3/error b/core/src/test/resources/splain/plugin/ZIOSpec/source3/error deleted file mode 100644 index efd6cdf..0000000 --- a/core/src/test/resources/splain/plugin/ZIOSpec/source3/error +++ /dev/null @@ -1,14 +0,0 @@ -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=, cat=scala3-migration, site=source3.ServiceImpl.foo - def foo(s: String, i: Int) = - ^ diff --git a/core/src/test/scala/splain/plugin/ZIOSpec.scala b/core/src/test/scala/splain/plugin/ZIOSpec.scala index bd2b496..a8e0e6f 100644 --- a/core/src/test/scala/splain/plugin/ZIOSpec.scala +++ b/core/src/test/scala/splain/plugin/ZIOSpec.scala @@ -8,8 +8,4 @@ class ZIOSpec extends SpecBase.File { // TODO: is it still incorrect? checkError() } - - check("source3", profile = Profile.Splain("-Xsource:3")) { - checkError() - } }