Commit c21dc2e
authored
fix: needs
In the _Dog extends abstract class_ (aka Scala 2 way) `var` keyword is missing in the class defition
```
class Dog(name: String, age: Int) extends Pet(name):
...
```
As a result the `Dog` class fails to compile with the following error
`class Dog needs to be abstract, since def age: Int in class Pet is not defined`
adding `var` to the definition solves to problem
```
class Dog(name: String, var age: Int) extends Pet(name):
...
```var for Dog extends abstract class1 parent a5b859a commit c21dc2e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
0 commit comments