You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for similar issues before opening a new one.
Description
You can copy argument blocks in procedures mutator workspace. This is intentional behaviour and even has a special check for pasting
However, currently procedures_mutatorarg validator returns null after pasting such block which supposedely should reset it to the previous valid state, but for pasted blocks previous state is actually invalid
You may end up with duplicate argument blocks inside function, which can raise exception during code generation Duplicate parameter name not allowed in this context and lead to generation of invalid code
Reproduction steps
Create procedure definition block
Open arguments editing mutator workspace
Insert argument block
Hit copy hotkey and then paste hotkey
Insert duplicate block in arguments
Priority
You can accidentally break code generation, but it can be manually fixed too
Stack trace
Uncaught SyntaxError: Duplicate parameter name not allowed in this context
at runCode (index.js:38:1)
at eval (index.js:65:1)
at WorkspaceSvg$$module$build$src$core$workspace_svg.fireChangeListener (blockly_compressed.js:1346:89)
at fireNow$$module$build$src$core$events$utils (blockly_compressed.js:87:337)
Check for duplicates
Description
You can copy argument blocks in procedures mutator workspace. This is intentional behaviour and even has a special check for pasting
However, currently
procedures_mutatorargvalidator returnsnullafter pasting such block which supposedely should reset it to the previous valid state, but for pasted blocks previous state is actually invalidYou may end up with duplicate argument blocks inside function, which can raise exception during code generation
Duplicate parameter name not allowed in this contextand lead to generation of invalid codeReproduction steps
Priority
You can accidentally break code generation, but it can be manually fixed too
Stack trace
Screenshots
arguments.bug.mp4
Browsers
No response