Elements 2513: Global less visible

This is my first test case, which compiles and works well under 2409 and fails to compile under 2513 with error:

Error (E589) Member “test.__Global.SPathSeparators” is less visible than inlined method “method TWhatever.SecureParentPath(aSeparators: sequence of remobjects.elements.rtl.String): remobjects.elements.rtl.String” it is used from Test D:\RemObjects\Test\Program.pas 17

TestGlobalLessVisible.zip (2.9 KB)

This is an as-designed change. Default visibility oil Oxygene is “Assembly”, but by mistake globals were always treated as “public” on some platforms. You will now need to mark them as public, if you want them visible outside the assembly.

Well, in my test case global consts are defined in the same file, so IMO this should count as the same assembly.

However, everything is different now in Elements 2521, which I downloaded and installed in the meantime. The test case compiles ok.

1 Like

That part should be fixed in 2521 (actually a few weeks prior).