Title: [Lua] The reserved functions "objectToIndex" and "objectFromIndex" collide with user functions · Issue #1053 · wurstscript/WurstScript · GitHub
Open Graph Title: [Lua] The reserved functions "objectToIndex" and "objectFromIndex" collide with user functions · Issue #1053 · wurstscript/WurstScript
X Title: [Lua] The reserved functions "objectToIndex" and "objectFromIndex" collide with user functions · Issue #1053 · wurstscript/WurstScript
Description: These two functions are apparently reserved but the developer is unaware. I have a tuple called 'object' in my project and necessarily I created indexing functions 'objectToIndex' and 'objectFromIndex'. Afaik the compiler did not warn me...
Open Graph Description: These two functions are apparently reserved but the developer is unaware. I have a tuple called 'object' in my project and necessarily I created indexing functions 'objectToIndex' and 'objectFromIn...
X Description: These two functions are apparently reserved but the developer is unaware. I have a tuple called 'object' in my project and necessarily I created indexing functions 'objectToIndex' a...
Opengraph URL: https://github.com/wurstscript/WurstScript/issues/1053
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Lua] The reserved functions \"objectToIndex\" and \"objectFromIndex\" collide with user functions","articleBody":"\r\n\r\nThese two functions are apparently reserved but the developer is unaware. I have a tuple called 'object' in my project and necessarily I created indexing functions 'objectToIndex' and 'objectFromIndex'. Afaik the compiler did not warn me that I shouldn't use these reserved names and ultimately it used my functions instead of the wurst-generated object indexing functions that are generated when using \"x castTo int\".\r\n\r\nIdeally I am able to use them since I can in jass and otherwise I would have to rewrite a large library. Maybe the compiler can detect if those functions have been defined by the user and instead generate different function names?\r\n\r\nOr just change the names to something that is less likely to collide with developer code? \"__objectFromIndex\" and \"__objectToIndex\" perhaps?","author":{"url":"https://github.com/jlfarris91","@type":"Person","name":"jlfarris91"},"datePublished":"2022-03-22T20:58:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1053/WurstScript/issues/1053"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:22722441-4a29-dde0-e7fa-337d00ff8b4f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9AA2:3D32FE:28E344B:379E59C:698C75A0 |
| html-safe-nonce | e333fc07df583ca316c1ff2cd31d865f455a2272e084fba70b67a47b3f8f06ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUEyOjNEMzJGRToyOEUzNDRCOjM3OUU1OUM6Njk4Qzc1QTAiLCJ2aXNpdG9yX2lkIjoiODYzODU2MTc0OTYzOTY1Njg2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 10290dfaac317e45c56411c0ce61027a89dae06db2c571007445806d078b5bc5 |
| hovercard-subject-tag | issue:1177297518 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wurstscript/WurstScript/1053/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3dc70aebf80c1d0ce1b6c975145ae6d1243972ce71c125851ea013d1c0f3ccfe/wurstscript/WurstScript/issues/1053 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3dc70aebf80c1d0ce1b6c975145ae6d1243972ce71c125851ea013d1c0f3ccfe/wurstscript/WurstScript/issues/1053 |
| og:image:alt | These two functions are apparently reserved but the developer is unaware. I have a tuple called 'object' in my project and necessarily I created indexing functions 'objectToIndex' and 'objectFromIn... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jlfarris91 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/wurstscript/WurstScript git https://github.com/wurstscript/WurstScript.git |
| octolytics-dimension-user_id | 30814797 |
| octolytics-dimension-user_login | wurstscript |
| octolytics-dimension-repository_id | 3584229 |
| octolytics-dimension-repository_nwo | wurstscript/WurstScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3584229 |
| octolytics-dimension-repository_network_root_nwo | wurstscript/WurstScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width