-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
sbt-test/scala2-compat/i19675/UnrelatedDeprecationWarning.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,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") | ||
} | ||
} |
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,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)) |
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 @@ | ||
> compile |