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

Add "did you mean" suggestions for functions and procedures #199

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

eminence
Copy link
Contributor

@eminence eminence commented Oct 8, 2023

Works with built-in functions and procedures, and user-defined functions:

>>> fn foo_bar<T>(t: T) = t

  fn foo_bar<T>(t: T) -> T = t

>>> foobar(4)
error: while type checking
  ┌─ <input:5>:1:1
  │
1 │ foobar(4)
  │ ^^^^^^ unknown callable
  │
  = Did you mean 'foo_bar'?

>>> assertt(true)
error: while type checking
  ┌─ <input:6>:1:1
  │
1 │ assertt(true)
  │ ^^^^^^^ unknown callable
  │
  = Did you mean 'assert'?

>>> ceiling(4.5)
error: while type checking
  ┌─ <input:7>:1:1
  │
1 │ ceiling(4.5)
  │ ^^^^^^^ unknown callable
  │
  = Did you mean 'ceil'?

Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thank you very much!

@sharkdp sharkdp merged commit 0c913f7 into sharkdp:master Oct 8, 2023
14 checks passed
@eminence eminence deleted the func_did_you_mean branch October 8, 2023 17:22
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

Successfully merging this pull request may close these issues.

2 participants