File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change
1
+ // Dotty rewrites only withFilter calls occurring in for expressions to filter calls.
2
+ // So this test does not compile.
1
3
object Test {
2
4
def BrokenMethod (): HasFilter [(Int , String )] = ???
3
5
@@ -15,12 +17,12 @@ object Test {
15
17
(implicit F0 : NoImplicit ): HasWithFilter = ???
16
18
}
17
19
18
- BrokenMethod ().withFilter(_ => true ) // okay
19
- BrokenMethod ().filter(_ => true ) // okay
20
+ BrokenMethod ().withFilter(_ => true ) // error
21
+ BrokenMethod ().filter(_ => true ) // ok
20
22
21
23
locally {
22
24
import addWithFilter ._
23
- BrokenMethod ().withFilter((_ : (Int , String )) => true ) // okay
25
+ BrokenMethod ().withFilter((_ : (Int , String )) => true ) // error
24
26
}
25
27
26
28
locally {
@@ -33,6 +35,6 @@ object Test {
33
35
// `(B => Boolean)`. Only later during pickling does the
34
36
// defensive check for erroneous types in the tree pick up
35
37
// the problem.
36
- BrokenMethod ().withFilter(x => true ) // erroneous or inaccessible type.
38
+ BrokenMethod ().withFilter(x => true ) // error
37
39
}
38
40
}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments