Skip to content

Fix a typo, add missing space in code snippet #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tutorials/tour/_posts/2017-02-13-pattern-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ In the `case Email(email, _, _) if importantPeopleInfo.contains(email)`, the pat
You can match on the type like so:
```tut
abstract class Device
case class Phone(model: String) extends Device{
case class Phone(model: String) extends Device {
def screenOff = "Turning screen off"
}
case class Computer(model: String) extends Device {
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour/_posts/2017-02-13-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ iterator.next() // prints 1
This `IntIterator` class takes a parameter `to` as an upper bound. It `extends Iterator[Int]` which means that the `next` method must return an Int.

## Subtyping
Subtypes of traits can be used where a the trait is required.
Subtypes of traits can be used where a trait is required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

Where a given trait is required, a subtype of the trait can be used instead.

Avoids the forward reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Will update PL this evening (in 10 hours)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@som-snytt done. Please review.

```tut
import scala.collection.mutable.ArrayBuffer

Expand Down