Skip to content

Commit

Permalink
set self type
Browse files Browse the repository at this point in the history
  • Loading branch information
yinwang0 committed Apr 12, 2016
1 parent 869736d commit 62b7a00
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public Type visit(BinOp node, State s) {
if (ltype instanceof InstanceType) {
Type opType = ltype.table.lookupAttrType("__sub__");
if (opType instanceof FunType) {
((FunType) opType).setSelfType(ltype);
return apply((FunType) opType, Collections.singletonList(rtype), null, null, null, node);
}
}
Expand Down

0 comments on commit 62b7a00

Please sign in to comment.