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

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class IntIterator(to: Int) extends Iterator[Int]:
9898
0
9999
end IntIterator
100100

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

0 commit comments

Comments
 (0)