Skip to content

Commit ab8a5b0

Browse files
revert: restore simple FUNC_PARAM_VARIADIC->FUNC_PARAM_DEFAULT transformation - complex anyarray detection not working
Co-Authored-By: Dan Lynch <[email protected]>
1 parent 68369a3 commit ab8a5b0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/transform/src/transformers/v13-to-v14.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ export class V13ToV14Transformer {
10041004
const typeName = argType.names[argType.names.length - 1];
10051005
if (typeName && typeName.String && typeName.String.str) {
10061006
const typeStr = typeName.String.str.toLowerCase();
1007-
return typeStr === 'variadic';
1007+
return typeStr === 'anyarray';
10081008
}
10091009
}
10101010

@@ -1030,11 +1030,9 @@ export class V13ToV14Transformer {
10301030
}
10311031

10321032
if (node.mode !== undefined) {
1033-
if (node.mode.toString() === "FUNC_PARAM_DEFAULT") {
1034-
// Check if this should be FUNC_PARAM_VARIADIC based on context
1035-
const isVariadicType = this.isVariadicParameterType(node.argType);
1036-
result.mode = isVariadicType ? "FUNC_PARAM_VARIADIC" : "FUNC_PARAM_DEFAULT";
1037-
} else if (node.mode.toString() === "FUNC_PARAM_IN") {
1033+
if (node.mode === "FUNC_PARAM_VARIADIC") {
1034+
result.mode = "FUNC_PARAM_DEFAULT";
1035+
} else if (node.mode === "FUNC_PARAM_IN") {
10381036
result.mode = "FUNC_PARAM_DEFAULT";
10391037
} else {
10401038
result.mode = node.mode;

0 commit comments

Comments
 (0)