
April 19, 2022
8:10 p.m.
As @Mehdi2277 mentioned, using a bare `Final` annotation addresses this use case already. It works fine if the expression on the RHS of the assignment is simple, such as a literal integer value (`1`) or the negation of an integer literal (`-1`). I wouldn't recommend using more complex expressions on the RHS of a `Final` declaration, at least if this is part of a library, because inference results for more complex expressions can differ from one type checker to another.