hoo added a comment. |
If we change the metatable in the above example to the following, string concatenation will work:
setmetatable( definition, { __index = Label, __tostring = function( self ) return self:toString() end, __concat = function(t, str) return tostring(t) .. str end } )
But still for example the length operator (#label) wont correctly work.
TASK DETAIL
EMAIL PREFERENCES
To: hoo
Cc: IKhitron, Stashbot, greg, gerritbot, hoo, daniel, Aklapper, eranroz, D3r1ck01, Izno, Wikidata-bugs, aude, Dinoguy1000, jayvdb, MrStradivarius, Anomie, Jackmcbarn, Mbch331
Cc: IKhitron, Stashbot, greg, gerritbot, hoo, daniel, Aklapper, eranroz, D3r1ck01, Izno, Wikidata-bugs, aude, Dinoguy1000, jayvdb, MrStradivarius, Anomie, Jackmcbarn, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs