Commit 4a46240e authored by nanahira's avatar nanahira

arg def extended

parent e3c5da37
......@@ -46,13 +46,14 @@ export namespace CommandPut {
);
preRegistry.extend('arg', (data, cmd, ctx, nativeType) => {
const arg = cmd._arguments[data.index];
let arg = cmd._arguments[data.index];
if (arg) {
applyNativeTypeToArg(arg, nativeType);
} else if (data.decl) {
const decl = { ...data.decl };
applyNativeTypeToArg(decl, nativeType);
cmd._arguments[data.index] = decl;
arg = {};
cmd._arguments[data.index] = arg;
}
applyNativeTypeToArg(arg, nativeType);
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