Skip to content

Commit

Permalink
Update traits.md
Browse files Browse the repository at this point in the history
The `new` keyword is not needed in Scala 3
  • Loading branch information
marcogalluzzi committed May 15, 2024
1 parent 94d5643 commit 3334b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _tour/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class IntIterator(to: Int) extends Iterator[Int]:
0
end IntIterator

val iterator = new IntIterator(10)
val iterator = IntIterator(10)
iterator.next() // returns 0
iterator.next() // returns 1
```
Expand Down

0 comments on commit 3334b98

Please sign in to comment.