Navigation Menu

Skip to content

Commit

Permalink
Saner function call scoring and real fix for #315
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnask committed Nov 17, 2012
1 parent fb564b1 commit 188e02f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/rock/middle/FunctionCall.ooc
Expand Up @@ -165,7 +165,7 @@ FunctionCall: class extends Expression {
}

score := getScore(candidate)
if(score < 0) {
if(score == -1) {
if(debugCondition()) "** Score = -1! Aboort" println()
if(res fatal) {
// trigger a resolve on the candidate so that it'll display a more helpful error
Expand Down
1 change: 1 addition & 0 deletions source/rock/middle/FunctionDecl.ooc
Expand Up @@ -315,6 +315,7 @@ FunctionDecl: class extends Declaration {
getType: func -> FuncType {
type := FuncType new(token)
if(owner && !isStatic && !vDecl) {
type isClosure = true // Hack-ish way to prevent wrapping an access to a method into a closure structure
type argTypes add(owner instanceType)
}
for(arg in args) {
Expand Down

0 comments on commit 188e02f

Please sign in to comment.