Skip to content

Re-thought const handling

Submitted by Kristof Szabados

Link to original bug (#520094)

Description

In the current (internal) version of the compiler we are experimenting with letting constant being initialized by module parameters.

But as this has some side-effect we need to run a deeper investigation on it. For example this also becomes possible (although it might not be wished) " function f() return integer { if (rnd() < 0.5) { return 5; } else { return 10; } }

const integer c_dimension := f();
type integer Arr[c_dimension];

"

Version: 6.2.0