https://bugs.documentfoundation.org/show_bug.cgi?id=166146

Mike Kaganski <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from Mike Kaganski <[email protected]> ---
(In reply to sgerber from comment #3)

Yes, you are right. SbiParser::DefVar [1] handles the combination of const and
public.

However, the compiler implementation doesn't provide access from the module
being compiled to other modules' data. It succeeds at runtime, but not in
compile time, where consts must already have all values. Hence the error.

Definitely a bug (implementation defect). However, we need to notice that
if/when this is implemented, it's needed that the const in this module
reference the const in the other module, not its value obtained at the moment
of compilation - to avoid problematic situations, when one module with public
const is compiled; then another module with const referencing public const is
compiled; and then the first module is modified and compiled, so that the
original public const has a different value - but the second (already compiled,
not requiring a re-compilation) module still uses the old const value.

[1]
https://opengrok.libreoffice.org/xref/core/basic/source/comp/dim.cxx?r=298feac9c4d4204bdb6680f3bdd4ab97b2a6dad8&mo=6612&fi=202#202

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to