A detailed description - If you attempt to provide incorrect plugin:CreatePluginAction() arguments and the first of these incorrect arguments are a member of a table and the last argument is different from the other types, you get an incorrect error, “This function does not take self. Did you mean to use a dot instead of a colon?”. The correct warning message should be argument count mismatch.
Where it happens - Studio only.
When it happens - Only noticed it now, June 9th at 12:52 AM AST.
Videos and images
Reproduction instructions -
This should reproduce the issue 100% of the time:
1- Define ‘plugin’'s type as Plugin like so:
local plugin: Plugin = plugin
2- Attempt to call plugin:CreatePluginAction when the first of these arguments is indexing something. This index can but doesn’t have to index a real object. t[1]
where t
is nil will reproduce the issue, as well as when t
is an actual table.
3- Provide any 4 more arguments after this, like so:
4- Now, as the 5th argument, add a value that is not equal to the fourth argument but ensure this fourth argument is incorrect (a string, instance, nil, anything except a boolean.
5- Now, provide a 6th argument. This argument should not be the same type as the 4th argument. It can be anything, this will reproduce the issue.
Code to reproduce -
local plugin: Plugin = plugin
plugin:CreatePluginAction(a, '', '', '', '', nil)