updated types

This commit is contained in:
Dominic Grimm 2021-11-20 14:47:27 +01:00
parent 6427c7681c
commit 489f132e77
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ module Lifo
end
end
def size : Int
def size : Int32
@data.size
end

View File

@ -4,7 +4,7 @@ module Lifo
super(capacity)
end
def push(e : T) : Int32
def push(e : T) : Int
if @capacity == -1 || size < @capacity
@data << e
@ -14,7 +14,7 @@ module Lifo
end
end
def push?(e : T) : Int32?
def push?(e : T) : Int?
begin
push(e)
rescue OverflowError