Skip to content

Conversation

@cirras
Copy link
Collaborator

@cirras cirras commented Oct 2, 2024

This PR makes a few improvements:

  • fixes parsing errors on anonymous methods with routine directives
  • fixes an issue where non-routine procedural types (procvars, anonymous methods, etc.) could never be considered variadic
    • which fixes a downstream IndexOutOfBoundsException that surfaced in the VariableInitialization rule
  • tidies the AST a bit around anonymous methods by introducing AnonymousMethodHeadingNode
  • persists routine directives into ProcedureType

Fixes #172 and #297.

@cirras cirras requested a review from fourls October 2, 2024 06:22
@cirras cirras linked an issue Oct 2, 2024 that may be closed by this pull request
2 tasks
fourls
fourls previously approved these changes Oct 8, 2024
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! It's quite a simple change even though it's over a few files.

cirras added 2 commits October 8, 2024 17:31
This was prompted by the realization that `varargs` weren't consistently
persisted into procedural type data, causing non-routine procedural
types to never be recognized as variadic.

Now we simply persist all of the directives, which will also make it
easier to factor calling conventions when comparing procedural types
for overload resolution.
@cirras cirras force-pushed the procedural_improvements branch from 89a7cba to f67a3c9 Compare October 8, 2024 06:32
@cirras cirras requested a review from fourls October 8, 2024 06:32
@cirras
Copy link
Collaborator Author

cirras commented Oct 8, 2024

Rebased to fix the CHANGELOG merge conflict.

Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, looks good.

@cirras cirras merged commit 83b0a66 into master Oct 8, 2024
2 checks passed
@cirras cirras deleted the procedural_improvements branch October 8, 2024 06:59
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.

Error raised when analyzing varargs method call File-level scan failure on anonymous method declaration with a calling convention

3 participants