We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 025bc51 commit 788b264Copy full SHA for 788b264
tests/pos/unused-pathdep-1.scala
@@ -0,0 +1,19 @@
1
+object Test {
2
+
3
+ fun1(new Bar)
4
+ fun2(new Bar)
5
+ fun3(new Bar)
6
7
+ def fun1[F >: Bar <: Foo](unused f: F): f.X = null.asInstanceOf[f.X]
8
+ def fun2[F >: Bar <: Foo](unused f: F)(unused bar: f.B): f.B = null.asInstanceOf[f.B]
9
+ def fun3[F >: Bar <: Foo](unused f: F)(unused b: f.B): b.X = null.asInstanceOf[b.X]
10
+}
11
12
+class Foo {
13
+ type X
14
+ type B <: Bar
15
16
17
+class Bar extends Foo {
18
+ type X = String
19
tests/pos/unused-pathdep-2.scala
+ type F >: Bar <: Foo
+ unused val f: F = new Bar
+ type F1 <: f.X
+ type F2[Z <: f.X]
0 commit comments