Browse files

Merge pull request #423 from shamanas/refFunc

Operator calls on objects of a child class can now be correctly resolved to the operator declaration for the base class
  • Loading branch information...
2 parents e0c2529 + 3bf2841 commit 548d515d66a4389e8a0218c33318c96295b7f4c6 @shamanas shamanas committed Jun 5, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 source/rock/middle/BinaryOp.ooc
  2. +1 −1 source/rock/middle/UnaryOp.ooc
View
4 source/rock/middle/BinaryOp.ooc
@@ -500,10 +500,10 @@ BinaryOp: class extends Expression {
return -1
}
- leftScore := left getType() getStrictScore(opLeft getType())
+ leftScore := left getType() getScore(opLeft getType())
if(leftScore == -1) return -1
- rightScore := right getType() getStrictScore(opRight getType())
+ rightScore := right getType() getScore(opRight getType())
if(rightScore == -1) return -1
reqScore := reqType ? fDecl getReturnType() getScore(reqType) : 0
View
2 source/rock/middle/UnaryOp.ooc
@@ -136,7 +136,7 @@ UnaryOp: class extends Expression {
if(args get(0) getType() == null || inner getType() == null) { return -1 }
- argScore := args get(0) getType() getStrictScore(inner getType())
+ argScore := args get(0) getType() getScore(inner getType())
if(argScore == -1) return -1
reqScore := reqType ? fDecl getReturnType() getScore(reqType) : 0
if(reqScore == -1) return -1

0 comments on commit 548d515

Please sign in to comment.