Skip to content

Commit 9203e38

Browse files
committed
Merge pull request #389 from Cfeusier/CF_fix_typo_collections_arrays
Fix typo (incorrect variable name) in Overviews > Collections > Arrays
2 parents 8cd55c9 + 3cbb0be commit 9203e38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

overviews/collections/arrays.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The Scala 2.8 design is much simpler. Almost all compiler magic is gone. Instead
2626

2727
scala> val seq: Seq[Int] = a1
2828
seq: Seq[Int] = WrappedArray(1, 2, 3)
29-
scala> val a4: Array[Int] = s.toArray
29+
scala> val a4: Array[Int] = seq.toArray
3030
a4: Array[Int] = Array(1, 2, 3)
3131
scala> a1 eq a4
3232
res2: Boolean = true
@@ -103,7 +103,7 @@ Here is some REPL interaction that uses the `evenElems` method.
103103
In both cases, the Scala compiler automatically constructed a class manifest for the element type (first, `Int`, then `String`) and passed it to the implicit parameter of the `evenElems` method. The compiler can do that for all concrete types, but not if the argument is itself another type parameter without its class manifest. For instance, the following fails:
104104

105105
scala> def wrap[U](xs: Array[U]) = evenElems(xs)
106-
<console>:6: error: could not find implicit value for
106+
<console>:6: error: could not find implicit value for
107107
evidence parameter of type ClassManifest[U]
108108
def wrap[U](xs: Array[U]) = evenElems(xs)
109109
^

0 commit comments

Comments
 (0)