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 #427, matching lambdas against variable patterns #436

Merged
merged 1 commit into from May 24, 2016
Merged

fix #427, matching lambdas against variable patterns #436

merged 1 commit into from May 24, 2016

Conversation

ghost
Copy link

@ghost ghost commented May 23, 2016

Fixes #427.

If you've followed that issue, then there was some discussion about whether the following program should compile or not:

passive class IntContainer
  x: int
  def init(x: int): void
    this.x = x

  def MyCustomPattern(): Maybe int
    Just this.x

class Main
  def main(): void
    match new IntContainer(3) with
      MyCustomPattern(MyCustomPattern) => print MyCustomPattern

How to solve issue #427 depends on whether this example should compile or not. There are some disagreements on this matter and this PR takes the approach which allows the above example to compile, partly because it is easier to implement that way -- the type checker does not have to be extended with the ability to throw a new kind of error.

@ghost
Copy link
Author

ghost commented May 23, 2016

Also, why the fuck do I keep getting old commits included into my pull requests? I merged upstream/development and checked out a new branch right before making this.

Only the last commit is supposed to be a part of this PR.

@kikofernandez
Copy link
Contributor

kikofernandez commented May 23, 2016

Also, why the fuck do I keep getting old commits included into my pull requests? I merged upstream/development and checked out a new branch right before making this.

Drop by my office one of these days and I will get you back on track

@EliasC
Copy link
Contributor

EliasC commented May 24, 2016

Looks good! Merging in a bit...

@EliasC EliasC merged commit ae7ad51 into parapluu:development May 24, 2016
@EliasC EliasC deleted the lambdaMatching branch May 24, 2016 19:56
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.

4 participants