Skip to content

Conversation

@GuntherRademacher
Copy link
Member

Private functions declared in a library module are no longer required to be in the module namespace (see 5.18 Function Declarations). The corresponding check can be adapted easily, but the management of static functions in the StaticFuncs class currently mixes functions from all modules without taking into account where they were declared. As a result, it is not possible to use the same private function name in multiple modules.

This PR

  • groups static functions by declaring module to avoid name clashes
  • checks the declaring module to prevent main-module functions from becoming visible in imported modules
  • allows private functions of a module to be visible in all files comprising that module (as public functions already are)

Tests for this have been added in ModuleTest.functionVisibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant