Skip to content

Commit 3334b98

Browse files
Update traits.md
The `new` keyword is not needed in Scala 3
1 parent 94d5643 commit 3334b98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎_tour/traits.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class IntIterator(to: Int) extends Iterator[Int]:
9898
0
9999
endIntIterator
100100

101-
valiterator=newIntIterator(10)
101+
valiterator=IntIterator(10)
102102
iterator.next() // returns 0
103103
iterator.next() // returns 1
104104
```

0 commit comments

Comments
(0)