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.
13object 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.
You can’t perform that action at this time.
0 commit comments