Spec 13.3.1.1 (Static Semantics: Early Errors) says:
It is a Syntax Error if the BoundNames of BindingList contains any
duplicate entries.
Only let/const are supposed to be treated in this way, so we ensure that
one of them has been marked read-only (since we don't support "let"
yet).
There's still no runtime check on assigning to a constant-declared variable.
[ChangeLog][QtQml] "const" variable declarations now throw a SyntaxError if
multiple attempts to declare the same variable name are found. Note that
"const" is still not fully spec-compliant (i.e. reassignment at runtime is
not disallowed).
Task-number: QTBUG-58493
Change-Id: I31fd5f2bf3e79d48734e8ecb714c4e7f47e31d2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>