E1117: constant declared twice

View source

A constant has one name in its scope, and the name has one value (ADR-0052).

A constant has one name in its scope, and the name has one value (ADR-0052). Declaring const LIMIT twice is an error, even if both declarations have the same value. The error points at the second declaration.

Example

actus
const LIMIT: u8 = 1u8;
const LIMIT: u8 = 2u8;

verb main() {
}

Fix

Remove one declaration, or give each constant its own name.

actus
const LOW_LIMIT: u8 = 1u8;
const HIGH_LIMIT: u8 = 2u8;

verb main() {
}

Run actus explain E1117 in your terminal to read this entry offline. Browse Modules & rules or all error codes.