Skip to content

Commit 371c229

Browse files
committed
Test recategorization
1 parent 3dbf935 commit 371c229

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/pending/pos/t7239.scala renamed to tests/neg/t7239.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Dotty rewrites only withFilter calls occurring in for expressions to filter calls.
2+
// So this test does not compile.
13
object Test {
24
def BrokenMethod(): HasFilter[(Int, String)] = ???
35

@@ -15,12 +17,12 @@ object Test {
1517
(implicit F0: NoImplicit): HasWithFilter = ???
1618
}
1719

18-
BrokenMethod().withFilter(_ => true) // okay
19-
BrokenMethod().filter(_ => true) // okay
20+
BrokenMethod().withFilter(_ => true) // error
21+
BrokenMethod().filter(_ => true) // ok
2022

2123
locally {
2224
import addWithFilter._
23-
BrokenMethod().withFilter((_: (Int, String)) => true) // okay
25+
BrokenMethod().withFilter((_: (Int, String)) => true) // error
2426
}
2527

2628
locally {
@@ -33,6 +35,6 @@ object Test {
3335
// `(B => Boolean)`. Only later during pickling does the
3436
// defensive check for erroneous types in the tree pick up
3537
// the problem.
36-
BrokenMethod().withFilter(x => true) // erroneous or inaccessible type.
38+
BrokenMethod().withFilter(x => true) // error
3739
}
3840
}
File renamed without changes.

0 commit comments

Comments
 (0)