Description
When custom procedure calls that have number or string inputs are imported from Scratch 2.0, an extra (orphan/unreachable) shadow block is created. This block (with opcode text
or math_number
) has a reference to the procedure call block as its parent, but the original procedure_call block doesn't have any reference to this block (it references a different text
/math_number
block as its shadow instead). This creates problems during project validation as there shouldn't be unreferenced text
/math_number
blocks at the top level since they're actually only used as fields of other blocks.
Take as an example, this minimum repro project:
When we load this project into 3.0 from a 2.0 project, we see the following in the Sprites' blocks:
When we create this project from scratch in 3.0, we see the following in the Sprite's blocks:
Notice that there's an extra block with opcode 'text' in the imported project vs. the 3.0 project.