fixed types

This commit is contained in:
Dominic Grimm 2021-11-20 14:50:11 +01:00
parent 97429418ec
commit 9707f5d179

View file

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