diff options
| author | OpportunityLiu <[email protected]> | 2019-08-26 17:12:12 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-08-26 17:12:12 +0800 |
| commit | 4c7f077a102f35428766bb3fddb8a93e30313cc1 (patch) | |
| tree | cfb9dcb60639f317f42d68645e14020ad6aa96d3 | |
| parent | 116c0f260725e26ae5de6207698e94cfaee7c5d5 (diff) | |
fix
| -rw-r--r-- | xmake/core/base/serialize.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/base/serialize.lua b/xmake/core/base/serialize.lua index 7c5c2200c..5ffb6b818 100644 --- a/xmake/core/base/serialize.lua +++ b/xmake/core/base/serialize.lua @@ -216,7 +216,9 @@ function serialize._resolveref(root, fenv, ...) end if type(pos) ~= "table" then local vpre = serialize._make(v, {}) - return nil, string.format("unable to resolve [%s] in <root>/%s, which is %s", vpre, table.concat(path, "/", 1, i - 1), pos) + table.insert(path, 1, "<root>") + local pathstr = table.concat(path, "/", 1, i) + return nil, string.format("unable to resolve [%s] in %s, which is %s", vpre, pathstr, pos) end pos = pos[v] end @@ -335,7 +337,7 @@ end function stub:__tostring() local fparams = {} for i = 1, self.params.n do - fparams[i] = serialize._make(self.params[i]) + fparams[i] = serialize._make(self.params[i], {}) end return string.format("%s(%s)", self.name, table.concat(fparams, ", ")) end |
