https://bugzilla.wikimedia.org/show_bug.cgi?id=66278
Bug ID: 66278
Summary: __call metamethod doesn't work on elements of the
export table
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: Unprioritized
Component: Scribunto
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
Create the following as Module:Foo:
local p, mt = {}, {}
function mt.__call(t, frame)
return 'Hello from the __call metamethod'
end
p.main = setmetatable({}, mt)
return p
From the sandbox, =p.main(mw.getCurrentFrame()) correctly displays "Hello from
the __call metamethod". From wikitext, however, {{#invoke:Foo|main}} displays a
script error that p.main isn't a function.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l