Skip to content
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

Runtime type argument checks based on existing function signatures #6884

Closed
JaroslavTulach opened this issue May 30, 2023 · 2 comments
Closed
Assignees

Comments

@JaroslavTulach
Copy link
Member

JaroslavTulach commented May 30, 2023

Follow up of #6682:

Since #6790 we have a way to opt-in for runtime argument checks of functions by using inline ascribed types (e.g. x:X). However there are limitations of inline ascribed types - for example they cannot specify return type of a function. There is a proposal to extend the inline syntax, however the classical syntax -> -> isn't going away - we need a way to type a function variable.

As such it makes sense to expand the runtime type checks to classical function type syntax. That will require changes thru out our libraries to adjust existing signature to their real value - at worst case opt-out of the check by add | Any to the argument signature.

@JaroslavTulach JaroslavTulach added this to the Beta Release milestone May 30, 2023
@jdunkerley jdunkerley moved this from ❓New to 📤 Backlog in Issues Board May 30, 2023
@jdunkerley jdunkerley removed this from the Beta Release milestone Jul 11, 2023
@JaroslavTulach
Copy link
Member Author

There are

since December 2023.

@JaroslavTulach
Copy link
Member Author

#8502 seems to be good enough for now as it allows proper typing and is opt-in unlike starting to check existing signatures.

@JaroslavTulach JaroslavTulach closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
@github-project-automation github-project-automation bot moved this from 📤 Backlog to 🟢 Accepted in Issues Board Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants