Skip to content

Can't declare Delegates outside of module they're declared in for packages #1999

@fafalone

Description

@fafalone

Describe the bug
WinDevLib has a number of delegates, all defined as Public Delegate ...

Dim x As (Delegate) or x As (Delegate) in a UDT or Private x As (Delegate) fail with unrecognized symbol outside the module they're defined in, both within WDL and projects referencing it.

For some reason in my other projects, they can be used outside their module (but the ones in WDL still can't).

To Reproduce
Add WinDevLib package, or open WinDevLib.twinproj.

Use Dim x As Subclassproc anywhere besides wdAPIComCtl.twin, or any other Public Delegate outside the WDL module it's defined in..

Expected behavior
Available everywhere when Public.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • twinBASIC compiler version Beta 644

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions