Skip to content

coerce* in types submodule silenly returns nil if coercion failed #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
no1seman opened this issue Apr 16, 2022 · 1 comment
Open
Assignees

Comments

@no1seman
Copy link

coerceInt, coerceLong, coerceFloat, coerceBoolean, coerceString - silenly returns nil if coesion failed:

if not isInt(value) then return end

if not isLong(value) then return end

if not isFloat(value) then return end

Seems it wiil better to raise an error if coercion failed (to be discussed)

@no1seman
Copy link
Author

Also pay attention to this comment: #55 (comment)

@no1seman no1seman changed the title coerce* in types submodule silenly returns nil if coesion failed coerce* in types submodule silenly returns nil if coerce failed Apr 19, 2022
@no1seman no1seman changed the title coerce* in types submodule silenly returns nil if coerce failed coerce* in types submodule silenly returns nil if coercion failed Apr 19, 2022
@Totktonada Totktonada self-assigned this May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants