Commit 4a46240e authored by nanahira's avatar nanahira

arg def extended

parent e3c5da37
...@@ -46,13 +46,14 @@ export namespace CommandPut { ...@@ -46,13 +46,14 @@ export namespace CommandPut {
); );
preRegistry.extend('arg', (data, cmd, ctx, nativeType) => { preRegistry.extend('arg', (data, cmd, ctx, nativeType) => {
const arg = cmd._arguments[data.index]; let arg = cmd._arguments[data.index];
if (arg) { if (arg) {
applyNativeTypeToArg(arg, nativeType); arg = {};
} else if (data.decl) { cmd._arguments[data.index] = arg;
const decl = { ...data.decl }; }
applyNativeTypeToArg(decl, nativeType); applyNativeTypeToArg(arg, nativeType);
cmd._arguments[data.index] = decl; if (data.decl) {
Object.assign(arg, data.decl);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment