mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-14 23:04:57 +00:00
Added line number to type inference errors. Closes #142
This commit is contained in:
parent
5e7d908018
commit
ec863e5c43
@ -26,7 +26,11 @@ public class Pass1TypeInference extends Pass1Base {
|
||||
for(Statement statement : block.getStatements()) {
|
||||
if(statement instanceof StatementAssignment) {
|
||||
StatementAssignment assignment = (StatementAssignment) statement;
|
||||
SymbolTypeInference.inferAssignmentLValue(getProgram(), assignment, false);
|
||||
try {
|
||||
SymbolTypeInference.inferAssignmentLValue(getProgram(), assignment, false);
|
||||
} catch(CompileError e) {
|
||||
throw new CompileError(e.getMessage(), statement.getSource());
|
||||
}
|
||||
} else if(statement instanceof StatementCall) {
|
||||
StatementCall call = (StatementCall) statement;
|
||||
String procedureName = call.getProcedureName();
|
||||
|
Loading…
Reference in New Issue
Block a user