Skip to content

Commit db2aec1

Browse files
committed
Regression tests
1 parent 9467cda commit db2aec1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/pos/i17631.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ object Main {
3232
(bad1, bad2)
3333
}
3434
}
35+
36+
def `i18388`: Unit =
37+
def func(pred: [A] => A => Boolean): Unit =
38+
val _ = pred
39+
()
40+
val _ = func

tests/warn/unused-privates.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,12 @@ package locked:
295295
private[locked] def locker(): Unit = () // warn as we cannot distinguish unqualified private at top level
296296
package basement:
297297
private[locked] def shackle(): Unit = () // no warn as it is not top level at boundary
298+
299+
object `i19998 refinement`:
300+
trait Foo {
301+
type X[a]
302+
}
303+
trait Bar[X[_]] {
304+
private final type SelfX[a] = X[a] // was false positive
305+
val foo: Foo { type X[a] = SelfX[a] }
306+
}

0 commit comments

Comments
 (0)