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

Fix validation of provides lists of object literals. #2860

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

mfelsche
Copy link
Contributor

Previously using a type alias pointing to a UNION type in the provides list of an object literal made the compiler assert.

fixes #2829

There is still a missing case where one would in general expect a compiler error, but nothing is thrown: Having a union of subtypes behind a type-alias:

interface I1
interface I2

type T1 is (I1 | I2)

actor Main
  new env(e: Env) =>
    object is T1 end

By the time the object AST is resolved the union folding already kicked in, so T1 only resolves to I1, not a union anymore. I am unsure what to do about this. Is this really a case that we should care about?

@mfelsche
Copy link
Contributor Author

We do have a segfault on armhf running the testsuite, restarting the job.

@mfelsche mfelsche added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Aug 14, 2018
@jemc jemc merged commit 2dde04b into master Aug 20, 2018
@jemc jemc deleted the object-provides-check branch August 20, 2018 13:26
ponylang-main added a commit that referenced this pull request Aug 20, 2018
mfelsche added a commit to ponylang/http that referenced this pull request Aug 23, 2018
that came into ponyc master with ponylang/ponyc#2860
mfelsche added a commit to ponylang/http that referenced this pull request Aug 23, 2018
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.

Compiler Assert on Subtyped Object Literals
2 participants