summaryrefslogtreecommitdiff
path: root/xmake/core/base/table.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-04-13 16:27:02 +0800
committerruki <[email protected]>2016-04-13 16:27:02 +0800
commit3126beb37ff78520bdb23bb9c0548b9c6a80cf22 (patch)
tree2fbe08cd057fb57f4c941adfca6e2d8abd78fad1 /xmake/core/base/table.lua
parent097a0d5eb612d898fb8de01d6db7760aed947b4b (diff)
impl inherit
Diffstat (limited to 'xmake/core/base/table.lua')
-rw-r--r--xmake/core/base/table.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 7427f3a53..746947bd9 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -345,7 +345,7 @@ function table.inherit2(self, clasz)
-- init instance
for k, v in pairs(clasz) do
- if type(v) == "function" then
+ if type(v) == "function" and self[k] == nil then
self[k] = v
end
end