Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements auto-created prototype incorrectly parses qualified vars, and doesn't qualify it, or interface itself when ambiguous #1131

Closed
fafalone opened this issue Aug 27, 2022 · 1 comment

Comments

@fafalone
Copy link
Collaborator

fafalone commented Aug 27, 2022

Describe the bug
If an interface is defined in tB with a member that is project-qualified (e.g. Sub MySub(ByVal myVar As MyProject.MyOtherInterface), and you then in a class add Implements MyInterface, then select MyInterface from the dropdown, tB will automatically create a prototype incorrectly: Private Sub MyInterface_MySub(ByVal myVar As MyProject) Implements MyInterface.MySub
This is further broken in that it's not recognized as the implementation until you qualify Implements MyProject.MyInterface.MySub.
After you fix the first member, the same problems arise on subsequent members you select to insert auto-generated prototypes.

To Reproduce

  1. Define MyInterface and MyOtherInterface
  2. Add member MySub to MyInterface with a variable qualified as MyProject.MyOtherInterface (where MyProject is your project name).
  3. In a class, add Implements MyProject.MyInterface
  4. Select MyInterface from the middle dropdown menu.

Expected behavior
It should include the full type, i.e. MyProject.MyOtherInface, and when the interface itself is ambiguous the Implements MyInterface.MySub should be qualified as MyProject.MyInterface.MySub.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • twinBASIC compiler version 0.15.100

Additional context
While the conflict with WinNativeForms is a bug that will be fixed, this situation could also presumably arise with user typelibs containing the same interface.

This also generated numerous [LINKER] compilation (codegen) error detected in '.' at line #??? errors while working on creating and correcting the definitions.

@WaynePhillipsEA
Copy link
Collaborator

Fixed in BETA 101, thanks for reporting.

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

No branches or pull requests

2 participants