Skip to content

Commit 6267159

Browse files
committed
abstract_collection: Add first contract
Signed-off-by: Florian Deljarry <[email protected]>
1 parent 244dd06 commit 6267159

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/core/collection/abstract_collection.nit

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ interface Collection[E]
130130
#
131131
# assert [1,2,3].first == 1
132132
fun first: E
133+
is
134+
expect(length > 0)
133135
do
134136
return iterator.item
135137
end

0 commit comments

Comments
 (0)