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

Features/void methods #86

Merged
merged 2 commits into from
Feb 13, 2015
Merged

Features/void methods #86

merged 2 commits into from
Feb 13, 2015

Conversation

EliasC
Copy link
Contributor

@EliasC EliasC commented Feb 12, 2015

This pull request tries to simplify the life of the programmer by allowing a body of a void-typed method to have any type (this type is of course ignored).

This commit makes the following code typecheck

```
def foo() : void
  42
```
With the previous commit, you could have

```
def foo() : void
  42
...
1 + foo()
```

and get an error message that only says that `+` needs numeric types.
This commit adds the type of the left and right operand to the error message.
kikofernandez pushed a commit that referenced this pull request Feb 13, 2015
@kikofernandez kikofernandez merged commit b9bf49a into new-ponyrt Feb 13, 2015
@EliasC EliasC deleted the features/void-methods branch April 15, 2015 12:19
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