Skip to content

Commit b58a78d

Browse files
jchybWojciechMazur
authored andcommitted
Add regression test for i19675 (#21159)
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). [Cherry-picked 53a40b4]
1 parent cd0103b commit b58a78d

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import com.twitter.finagle.Thrift
2+
import com.twitter.finagle.thrift.ThriftService
3+
import scala.reflect.ClassTag
4+
5+
class Minim {
6+
trait Foo[A]
7+
8+
object Foo {
9+
inline def make[A]: Foo[A] = ???
10+
}
11+
12+
final class Unrelated()
13+
14+
object Unrelated {
15+
val foo = Foo.make[Unrelated]
16+
}
17+
18+
object Main {
19+
def foo[S <: ThriftService](using ClassTag[S]) =
20+
Thrift.client.build[S]("asd")
21+
}
22+
}

Diff for: sbt-test/scala2-compat/i19675/build.sbt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
scalaVersion := sys.props("plugin.scalaVersion")
2+
3+
scalacOptions ++= Seq("-Wunused:imports", "-deprecation", "-Werror")
4+
libraryDependencies ++= Seq(
5+
"com.twitter" %% "finagle-thrift" % "24.2.0"
6+
).map(_.cross(CrossVersion.for3Use2_13))

Diff for: sbt-test/scala2-compat/i19675/test

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> compile

0 commit comments

Comments
 (0)