Skip to content

Commit

Permalink
Refactor method to fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pubudu91 committed Aug 17, 2018
1 parent c4189d8 commit e2d33d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public List<BType> visit(BMapType type, Operation op) {
} else if (op.arity == 2) {
return Lists.of(symTable.stringType, type.constraint);
}
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}

Expand All @@ -328,7 +328,7 @@ public List<BType> visit(BXMLType type, Operation op) {
} else if (op.arity == 2) {
return Lists.of(symTable.intType, symTable.xmlType);
}
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}

Expand All @@ -340,7 +340,7 @@ public List<BType> visit(BJSONType type, Operation op) {
} else if (op.arity == 1) {
return Lists.of(symTable.jsonType);
}
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}

Expand All @@ -354,7 +354,7 @@ public List<BType> visit(BArrayType type, Operation op) {
} else if (op.arity == 2) {
return Lists.of(symTable.intType, type.eType);
}
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}

Expand All @@ -366,7 +366,7 @@ public List<BType> visit(BTableType type, Operation op) {
} else if (op.arity == 1) {
return Lists.of(type.getConstraint());
}
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}

Expand All @@ -383,7 +383,7 @@ public List<BType> visit(BRecordType type, Operation op) {
} else if (op.arity == 2) {
return Lists.of(symTable.stringType, symTable.anyType);
}
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}

Expand All @@ -393,7 +393,7 @@ public List<BType> visit(BIntermediateCollectionType collectionType, Operation o
if (type.tupleTypes.size() == op.arity) {
return type.tupleTypes;
} else if (type.tupleTypes.size() < op.arity) {
logTooMayVariablesError(op);
logTooManyVariablesError(op);
return Lists.of(symTable.errType);
}
logNotEnoughVariablesError(op, type.tupleTypes.size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public List<BType> visit(BFiniteType type, Operation op) {

/* Util functions */

protected void logTooMayVariablesError(Operation op) {
protected void logTooManyVariablesError(Operation op) {
dlog.error(op.pos, DiagnosticCode.ITERABLE_TOO_MANY_VARIABLES, op.collectionType);
}

Expand Down

0 comments on commit e2d33d6

Please sign in to comment.