Compile checks for constants do not work #17
Labels
bug
Something isn't working
language
Issues with the flint-2 Flint language implementation or features
semantic check
Problems with the semantic analysis stage
Semantic analysis does not successfully test for reassignments to constants. At the moment, some limited checking exists. For example, the following contract would not compile:
However, note that if
self.a = 5
were insteada = 5
, then the error would not be caught.This kind of check also works for local variables, such as the following example, were it part of a top level declaration:
However, there are cases where the checker allows reassignments through when it should not, such as:
The text was updated successfully, but these errors were encountered: