Improve error message when trying to modify constant variables

This commit is contained in:
Federico Bond
2016-12-13 00:32:37 -03:00
parent 1c3605362d
commit de720e643d
3 changed files with 19 additions and 1 deletions
+2
View File
@@ -154,6 +154,8 @@ struct ExpressionAnnotation: ASTAnnotation
{
/// Inferred type of the expression.
TypePointer type;
/// Whether the expression is a constant variable
bool isConstant = false;
/// Whether it is an LValue (i.e. something that can be assigned to).
bool isLValue = false;
/// Whether the expression is used in a context where the LValue is actually required.