Skip to content

Commit c7eb44c

Browse files
authored
Merge pull request #919 from justinpermar/patch-2
add return type other than Unit onto the prepend() function in trait …
2 parents ae51ae9 + 2def921 commit c7eb44c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_tour/lower-type-bounds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To fix this, we need to flip the variance of the type of the parameter `elem` in
4242

4343
```tut
4444
trait Node[+B] {
45-
def prepend[U >: B](elem: U)
45+
def prepend[U >: B](elem: U): Node[U]
4646
}
4747
4848
case class ListNode[+B](h: B, t: Node[B]) extends Node[B] {

0 commit comments

Comments
 (0)