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
1818
1919Here is an example where this is useful:
2020
21- ``` tut:fail
21+ ``` tut
2222trait Node[+B] {
2323 def prepend(elem: B): Unit
2424}
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ trait User {
2424}
2525
2626trait 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")
2929}
3030
3131class 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_"
3333}
3434
3535val realBeyoncé = new VerifiedTweeter("Beyoncé")
You can’t perform that action at this time.
0 commit comments