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

Add diagnostic for passing more than 5 arguments to a callFunc #765

Conversation

iObject
Copy link
Collaborator

@iObject iObject commented Jan 6, 2023

Passing more than 5 arguments to a callFunc method will crash the app.
Adds a diagnostic message if more than 5 arguments are passed.

@iObject iObject linked an issue Jan 6, 2023 that may be closed by this pull request
Copy link
Member

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

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

Looks great! One change, we've been naming callfunc variables with a lowercase f. TokenKind.Callfunc, CallfuncExpression, so these changes should align with that.

src/DiagnosticMessages.ts Outdated Show resolved Hide resolved
src/Scope.spec.ts Outdated Show resolved Hide resolved
src/Scope.spec.ts Outdated Show resolved Hide resolved
src/Scope.spec.ts Outdated Show resolved Hide resolved
src/bscPlugin/validation/BrsFileValidator.ts Outdated Show resolved Hide resolved
iObject and others added 4 commits January 6, 2023 14:00
Co-authored-by: Bronley Plumb <bronley@gmail.com>
Co-authored-by: Bronley Plumb <bronley@gmail.com>
Co-authored-by: Bronley Plumb <bronley@gmail.com>
Co-authored-by: Bronley Plumb <bronley@gmail.com>
@TwitchBronBron TwitchBronBron merged commit f295226 into master Jan 6, 2023
@TwitchBronBron TwitchBronBron deleted the 760-add-a-warning-if-callfunc-is-called-with-more-than-5-parameters branch January 6, 2023 19:06
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.

add a warning if callfunc/@ is called with more than 5 parameters
2 participants