File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ While [upper type bounds](upper-type-bounds.html) limit a type to a subtype of a
18
18
19
19
Here is an example where this is useful:
20
20
21
- ``` tut:fail
21
+ ``` tut
22
22
trait Node[+B] {
23
23
def prepend(elem: B): Unit
24
24
}
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ trait User {
24
24
}
25
25
26
26
trait Tweeter {
27
- this: User => // reassign this
28
- def tweet(tweetText: String) = println(s"$username: $tweetText")
27
+ this: User => // reassign this
28
+ def tweet(tweetText: String) = println(s"$username: $tweetText")
29
29
}
30
30
31
31
class VerifiedTweeter(val username_ : String) extends Tweeter with User { // We mixin User because Tweeter required it
32
- def username = s"real $username_"
32
+ def username = s"real $username_"
33
33
}
34
34
35
35
val realBeyoncé = new VerifiedTweeter("Beyoncé")
You can’t perform that action at this time.
0 commit comments