Created
August 13, 2014 12:55
-
-
Save paulp/e002d1e101d91dbdc021 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class A { | |
| def f1(xs: Seq[Int]) = xs match { case xs: Seq[_] => xs } // infers Seq[Any] | |
| def f2(xs: Seq[Int]) = xs match { case xs: List[_] => xs } // infers List[Any] | |
| def f3(xs: List[Int]) = xs match { case xs: Seq[_] => xs } // infers List[Int] | |
| def f4(xs: List[Int]) = xs match { case xs: List[_] => xs } // infers List[Any] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment