-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discovered filter was still being generated.
Rather than withFilter, for a subset of for comprehension structures. Not sure if this was somewhat by design - only seems possible because refchecks was only looking for nme.filter, not nme.withFilter, so perhaps this was intended as some secret irrefutability backchannel? Really have to document that sort of thing if it's intentional. I assumed it wasn't and unified everything.
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// The test which this should perform but does not | ||
// is that f1 is recognized as irrefutable and f2 is not | ||
// This can be recognized via the generated classes: | ||
// | ||
// A$$anonfun$f1$1.class | ||
// A$$anonfun$f2$1.class | ||
// A$$anonfun$f2$2.class | ||
// | ||
// The extra one in $f2$ is the filter. | ||
// | ||
// !!! Marking with exclamation points so maybe someday | ||
// this test will be finished. | ||
class A { | ||
case class Foo[T](x: T) | ||
|
||
def f1(xs: List[Foo[Int]]) = { | ||
for (Foo(x: Int) <- xs) yield x | ||
} | ||
def f2(xs: List[Foo[Any]]) = { | ||
for (Foo(x: Int) <- xs) yield x | ||
} | ||
} |