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

Request: warning when passing knot instead of divert to a divert-expecting function #425

Closed
joningold opened this issue Apr 23, 2018 · 2 comments

Comments

@joningold
Copy link
Member

The following source generates a runtime error ("trying to use an int as a divert target"). It's the only time when we type parameters in the engine, so could we catch this at compile time?

(Catch: the parameter passed in might be a variable, in which case you can't catch it. But in this case where it's known to be a knot-name -- could we at least issue an appropriate warning?)

-> a (a) 

=== a (-> x) 
    -> DONE 

@joethephish
Copy link
Member

Hmm, good point. The engine doesn't in general have compile-type type information, except in this one case!

@joethephish
Copy link
Member

Fixed in f30c0ba.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants