-
Notifications
You must be signed in to change notification settings - Fork 123
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
feat: update error message for reserved self
function argument
#1737
base: main
Are you sure you want to change the base?
feat: update error message for reserved self
function argument
#1737
Conversation
self
function argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will produce a confusing error message
extends fun foo(self: Int, self: String) { }
Parameter name "self" is reserved for functions with "extends" modifier
Here it is an extends
function, it's just we have duplicate parameter names
if (params.length > 0) { | ||
const [firstParam, ...restParams] = params; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (params.length > 0) { | |
const [firstParam, ...restParams] = params; | |
const [head, ...restParams] = params; | |
if (!isUndefined(head)) { // from ../utils/array |
Issue
Closes #1735.
Checklist