Crystal 1.5 warnings
jwoertink opened this issue · comments
Starting with Crystal 1.5, when you define a method that's abstract in a parent class, the arguments must be named the same to avoid issues with calling the method with named args:
In src/tar/reader.cr:387:16
387 | def read(b : Bytes) : Int32
^
Warning: positional parameter 'b' corresponds to parameter 'slice' of the overridden method IO#read(slice : Bytes), which has a different name and may affect named argument passing
In src/tar/reader.cr:421:16
421 | def read(b : Bytes) : Int32
^
Warning: positional parameter 'b' corresponds to parameter 'slice' of the overridden method IO#read(slice : Bytes), which has a different name and may affect named argument passing
In src/tar/writer.cr:366:17
366 | def write(b : Bytes) : Nil
^
Warning: positional parameter 'b' corresponds to parameter 'slice' of the overridden method IO#write(slice : Bytes), which has a different name and may affect named argument passing
In src/tar/writer.cr:394:17
394 | def write(b : Bytes) : Nil
^
Warning: positional parameter 'b' corresponds to parameter 'slice' of the overridden method IO#write(slice : Bytes), which has a different name and may affect named argument passing
In src/tar/writer.cr:133:23
133 | if @hdr.flag == REGA
^---
Warning: Deprecated Crystar::REGA. Use `REG` instead
A total of 5 warnings were found.
Thank you @jwoertink . Your PR# #14 should be fixing this. If so can we have it closed?
Yup! Thanks 😄