Skip to content

Conversation

@ForNeVeR
Copy link
Member

@ForNeVeR ForNeVeR commented Mar 8, 2016

In my quest to fix #24 I've encountered some compiler bugs regarding to the let expressions and have exterminated these bugs.

The main problem I fixed is that BodyGenerator was used both in context of a function body and in context of a let clause body. In first context its return type should be based on a function return type (as we already discussed in #26, it shouldn't return anything when compiling a void function).

Now the BodyGenerator always receives (hopefully) the right return type definition, so the machinery added in #26 will make a good decisions about whether to return something or not.

Closes #24.

@ForNeVeR
Copy link
Member Author

ForNeVeR commented Mar 8, 2016

Mr. @rexim, currently you're the responsible reviewer, so please take a look if you can.

[typeof<obj>]
else tail_type
| [] -> [typeof<System.Void>]
| _ -> (gf.MakeGenerator context (List.rev body |> List.head)).ReturnTypes()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, doesn't List really have last or something like that? %)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, that's a good question. I'm almost sure that List module had no such function back the days of F# 2.0. But now it actually has! So I'll review the code and use it where possible. I'll create a separate issue for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@rexim
Copy link
Member

rexim commented Mar 16, 2016

The requet looks fine for me. I approve it. Thanks!

@rexim rexim assigned ForNeVeR and unassigned rexim Mar 16, 2016
ForNeVeR added a commit that referenced this pull request Mar 16, 2016
Test culture insensivity and bug fixes.
@ForNeVeR ForNeVeR merged commit 05ff496 into develop Mar 16, 2016
@ForNeVeR ForNeVeR deleted the feature/culture-info branch March 16, 2016 06:40
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.

Culture neutral tests

3 participants