Skip to content

Commit

Permalink
Derived types with functions taking functypes as arguments: Eliminate…
Browse files Browse the repository at this point in the history
…d TODO. Closes #275. Thank you for reporting!
  • Loading branch information
fredreichbier committed Feb 5, 2011
1 parent 413d0f5 commit 0bbda31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/rock/middle/FunctionDecl.ooc
Expand Up @@ -473,12 +473,16 @@ FunctionDecl: class extends Declaration {
if(debugCondition()) "Got -1 from finalScore!" println()
return Response OK
}
parentArgs := parent args getSize()
// todo: check for finalScore
for(i in 0..args getSize()) {
arg := args[i]
if(arg getType() instanceOf?(FuncType)) {
fType1 := arg getType() as FuncType
// TODO: add check 1) number of argument 2) it's a FuncType
// check 1) number of argument 2) it's a FuncType
if(parentArgs <= i || !parent args[i] getType() instanceOf?(FuncType)) {
break
}
fType2 := parent args[i] getType() as FuncType

//"for %s, got %s vs %s" printfln(toString(), fType1 toString(), fType2 toString())
Expand Down

0 comments on commit 0bbda31

Please sign in to comment.