Created
February 2, 2014 01:11
-
-
Save paulp/8761663 to your computer and use it in GitHub Desktop.
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
// Thanks for inferring types which I can't even access, scala. | |
scala> def f[A, CC[X]](xs: CC[A]) = xs | |
warning: there were 1 feature warning(s); re-run with -feature for details | |
f: [A, CC[X]](xs: CC[A])CC[A] | |
scala> f(scala.collection.immutable.BitSet(1)) | |
res0: scala.collection.AbstractSet[Int] = BitSet(1) | |
scala> var x: scala.collection.AbstractSet[Int] = res0 | |
<console>:9: error: class AbstractSet in package collection cannot be accessed in package collection | |
var x: scala.collection.AbstractSet[Int] = res0 | |
^ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment