twitter/scala_school — pull request #76 by yangsu (2013-02-19 02:47:14+00:00)
Title: Corrected the Pattern Matching on class members example in basics2.textile

The existing code:

```scala
def calcType(calc: Calculator) = calc match {
case calc.brand == "hp" && calc.model == "20B" => "financial"
case calc.brand == "hp" && calc.model == "48G" => "scientific"
case calc.brand == "hp" && calc.model == "30B" => "business"
case _ => "unknown"
}
```
Will produce the following errors.
```
:13: error: not found: value &&
case calc.brand == "hp" && calc.model == "20B" => "financial"
^
:14: error: not found: value &&
case calc.brand == "hp" && calc.model == "48G" => "scientific"
^
:15: error: not found: value &&
case calc.brand == "hp" && calc.model == "30B" => "business"
^
```

The cases should be converted to use guards.