Skip to content

Commit

Permalink
Add regression test for i19675 (#21159)
Browse files Browse the repository at this point in the history
Originally fixed by #19926
Closes #19675

Even though this is a slower sbt scripted test, I think it's worth
adding, since it showcases a different issue than what #19926 was
fixing, and I do not believe it is reproducible in any way without a
scala-2 dependency (so we cannot minimize it into regular compilation
test).
  • Loading branch information
jchyb authored Aug 20, 2024
1 parent 30317cd commit 53a40b4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
22 changes: 22 additions & 0 deletions sbt-test/scala2-compat/i19675/UnrelatedDeprecationWarning.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import com.twitter.finagle.Thrift
import com.twitter.finagle.thrift.ThriftService
import scala.reflect.ClassTag

class Minim {
trait Foo[A]

object Foo {
inline def make[A]: Foo[A] = ???
}

final class Unrelated()

object Unrelated {
val foo = Foo.make[Unrelated]
}

object Main {
def foo[S <: ThriftService](using ClassTag[S]) =
Thrift.client.build[S]("asd")
}
}
6 changes: 6 additions & 0 deletions sbt-test/scala2-compat/i19675/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
scalaVersion := sys.props("plugin.scalaVersion")

scalacOptions ++= Seq("-Wunused:imports", "-deprecation", "-Werror")
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-thrift" % "24.2.0"
).map(_.cross(CrossVersion.for3Use2_13))
1 change: 1 addition & 0 deletions sbt-test/scala2-compat/i19675/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> compile

0 comments on commit 53a40b4

Please sign in to comment.