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

Compiler error instead of crash for too few args to constructor in case pattern. #1880

Merged
merged 1 commit into from
May 3, 2017

Conversation

jemc
Copy link
Member

@jemc jemc commented May 2, 2017

This compiler crash occurs when the user accidentally used the non-let format of a case pattern, where the case is trying to instantiate the type and match with eq instead of matching on type,, and there was an earlier error when type-checking the case pattern expression (for example, too few arguments, as we have here..

class C
  new create(key: String) => None

actor Main
  new create(env: Env) =>
    let c: (C | None) = None
    match c
    | C => None
    end

This crash was originally encountered by @funkybob in #1878, but it was found to be a completely different bug.

@jemc jemc added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label May 2, 2017
@jemc jemc self-assigned this May 2, 2017
@jemc jemc mentioned this pull request May 2, 2017
@SeanTAllen SeanTAllen merged commit 027e695 into master May 3, 2017
ponylang-main added a commit that referenced this pull request May 3, 2017
@SeanTAllen SeanTAllen deleted the fix/crash-too-few-args-constructor-match-case branch May 3, 2017 19:36
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