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

Method exists #30

Open
JohnCoene opened this issue Sep 4, 2024 · 1 comment
Open

Method exists #30

JohnCoene opened this issue Sep 4, 2024 · 1 comment
Assignees
Labels
long-term Long-term feature

Comments

@JohnCoene
Copy link
Contributor

Check whether method exists.

type x: object {
  thing: bool
}

type y: object {
  another_thing: bool
}

func (obj: x) foo(): null {
  print("It's x!")
}

foo(x)

# this should fail
foo(y)
@JohnCoene JohnCoene added the long-term Long-term feature label Sep 4, 2024
@JohnCoene JohnCoene self-assigned this Sep 4, 2024
@JohnCoene
Copy link
Contributor Author

Requires R type inference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
long-term Long-term feature
Projects
None yet
Development

No branches or pull requests

1 participant