Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Closes #326 #336

Closed
wants to merge 2 commits into from

2 participants

@shamanas
Collaborator

Kinda ugly but I found no other way of doing it (Perhaps you can think of something else?).

@shamanas
Collaborator

Ok so the bug is acually the one I had figured. However, checking if the vDecl is contained in the closure's arguments is not enough when generics are in play as at this point the closure's generic arguments vDecls have had their name suffixed with _generic. I think there could be a cleaner fix so that we never reach that partialing condition but i cannot find out how to implement it.

@nddrylliog
Collaborator

Fun fact: while trying to make this code cleaner to fix this bug, I ran into... this bug. Haha!

@nddrylliog nddrylliog closed this
@nddrylliog
Collaborator

All done, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 20, 2011
  1. @shamanas
Commits on Nov 21, 2011
  1. @shamanas

    Final fix

    shamanas authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  source/rock/middle/FunctionCall.ooc
View
2  source/rock/middle/FunctionCall.ooc
@@ -325,7 +325,7 @@ FunctionCall: class extends Expression {
if(closureIndex > depth) { // if it's not found (-1), this will be false anyway
closure := trail get(closureIndex) as FunctionDecl
- if(closure isAnon && expr == null && !ref vDecl isGlobal) {
+ if(closure isAnon && expr == null && !ref vDecl isGlobal() && !closure args map(|value| value name) contains?(ref vDecl name + "_generic") && !closure args contains?(ref vDecl)) { // the ref may also be a closure's argument, in wich case we just ignore this
closure markForPartialing(ref vDecl, "v")
}
}
Something went wrong with that request. Please try again.