fixed failing check
This commit is contained in:
parent
6596edf6f8
commit
cedb12d7b6
|
@ -1483,7 +1483,7 @@ Expression *createExpression(AST_NODE_PTR currentNode) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expression->impl.parameter->kind == VariableKindDeclaration) {
|
if (expression->impl.parameter->kind == ParameterDeclarationKind) {
|
||||||
expression->result = expression->impl.parameter->impl.declaration.type;
|
expression->result = expression->impl.parameter->impl.declaration.type;
|
||||||
} else {
|
} else {
|
||||||
expression->result = expression->impl.parameter->impl.definiton.declaration.type;
|
expression->result = expression->impl.parameter->impl.definiton.declaration.type;
|
||||||
|
@ -1702,7 +1702,7 @@ int createAssign(Statement *ParentStatement, AST_NODE_PTR currentNode) {
|
||||||
return SEMANTIC_ERROR;
|
return SEMANTIC_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strg_expr->kind == StorageExprKindParameter) {
|
if (strg_expr->kind == AST_Parameter) {
|
||||||
if (getParameterQualifier(assign.destination->impl.parameter) == In) {
|
if (getParameterQualifier(assign.destination->impl.parameter) == In) {
|
||||||
print_diagnostic(¤tNode->location, Error, "Parameter is read-only: `%s`", assign.destination->impl.parameter->name);
|
print_diagnostic(¤tNode->location, Error, "Parameter is read-only: `%s`", assign.destination->impl.parameter->name);
|
||||||
return SEMANTIC_ERROR;
|
return SEMANTIC_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue