constant.value_not_fixed
Constant's value is only known while the app runs.
Area 3, Logic; not declinable; the next step is usually the agent's.
A constant is worked out while compiling, so its value can't come from a
call, config or clock:
type LoginAttempts = Int { min: 1}constant max_login_attempts: LoginAttempts = config.max_login_attemptsconfig { max_login_attempts: LoginAttempts { default: 5 }}
error A constant can't read config.max_login_attempts
--> main.jadpo:5:46
|5 | constant max_login_attempts: LoginAttempts = config.max_login_attempts | ^^^^^^^^^^^^^^^^^^^^^^^^^ only known while the app runs
- reason
- A constant is worked out while compiling, from literals, enum values, other constants, constructions, objects, lists and operators; a call,
configandclockgive values only while the app runs. - next
- Read
config.max_login_attemptswhere the value is used: a setting is chosen per deployment, and a value is a constant or a setting, never both (agent) - rule
- constant.
value_ not_ fixed - help
- https://jadpo.
dev/docs/errors/constant. value_ not_ fixed
Markdown for agents: /docs/errors/constant.value_not_fixed.md.Built from Jadpo main at aee2e8f.