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

Don’t consider type arguments inside a constraint as constraints. #1870

Merged
merged 1 commit into from
Apr 29, 2017

Conversation

plietar
Copy link
Contributor

@plietar plietar commented Apr 27, 2017

This better reflects their use. It allows arrow types and tuples to
appear in these positions. It also denies capability sets from appearing
in these positions. These have an extremely limited use, and are unlikely
to be used by anyone.

As a side effect, the default capability in these positions now
corresponds to the type default, rather than #any.

Also properly deny arrow types from appearing in constraints,
fixing #1809.


I'd like to add some positive tests for arrows and tuples in these positions,
but I'm not sure where they fit.

This better reflects their use. It allows arrow types and tuples to
appear in these positions. It also denies capability sets from appearing
in these positions. These have an extremely limited use, and are unlikely
to be used by anyone.

As a side effect, the default capability in these positions now
corresponds to the type default, rather than #any.

Also properly deny arrow types from appearing in constraints,
fixing ponylang#1809.
@plietar plietar force-pushed the fix-nested-constraints branch from 8eb3a8c to 3333e6d Compare April 27, 2017 00:41
@jemc jemc added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Apr 29, 2017
@jemc
Copy link
Member

jemc commented Apr 29, 2017

Thanks!

I'd like to add some positive tests for arrows and tuples in these positions,
but I'm not sure where they fit.

I agree - I don't think any of the existing test files are a good fit. Probably the best bet would be to create a new test file called type_params.cc or something similar.

However, since this is already a complete fix for the other bugs you noticed, I'll go ahead and merge this PR. You can feel free to add the positive tests in another PR if you wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants