refactor!: Deprecate Block.getVars() (#9574)

* refactor!: Deprecate `Block.getVars()`

* fix: Fix import path

* fix: Simplify test assertions
This commit is contained in:
Aaron Dodson
2026-01-20 11:19:50 -08:00
committed by GitHub
parent 2678f5845f
commit 4c79ea186f
10 changed files with 59 additions and 38 deletions

View File

@@ -58,9 +58,9 @@ export function procedures_defreturn(
returnValue = generator.INDENT + 'return ' + returnValue + ';\n';
}
const args = [];
const variables = block.getVars();
const variables = block.getVarModels();
for (let i = 0; i < variables.length; i++) {
args[i] = generator.getVariableName(variables[i]);
args[i] = generator.getVariableName(variables[i].getId());
}
let code =
'function ' +
@@ -93,7 +93,7 @@ export function procedures_callreturn(
// Call a procedure with a return value.
const funcName = generator.getProcedureName(block.getFieldValue('NAME'));
const args = [];
const variables = block.getVars();
const variables = block.getVarModels();
for (let i = 0; i < variables.length; i++) {
args[i] = generator.valueToCode(block, 'ARG' + i, Order.NONE) || 'null';
}