Title: [feature/refactor] general bugs · Issue #165 · ZenCodeLang/ZenCode · GitHub
Open Graph Title: [feature/refactor] general bugs · Issue #165 · ZenCodeLang/ZenCode
X Title: [feature/refactor] general bugs · Issue #165 · ZenCodeLang/ZenCode
Description: I'm going to use this issue to track all the bugs I find while working on the LSP Error Reporting missing call argument reported incorrectly This should be reported as too many call arguments or better 1 parameter expecetd but 2 were giv...
Open Graph Description: I'm going to use this issue to track all the bugs I find while working on the LSP Error Reporting missing call argument reported incorrectly This should be reported as too many call arguments or be...
X Description: I'm going to use this issue to track all the bugs I find while working on the LSP Error Reporting missing call argument reported incorrectly This should be reported as too many call arguments o...
Opengraph URL: https://github.com/ZenCodeLang/ZenCode/issues/165
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[feature/refactor] general bugs","articleBody":"I'm going to use this issue to track all the bugs I find while working on the LSP\r\n\r\n## Error Reporting\r\n- [ ] `missing call argument` reported incorrectly\r\nThis should be reported as `too many call arguments` or better `1 parameter expecetd but 2 were given`\r\n```zenscript\r\nblock.setFriction(1, \"\");\r\n```\r\nThis happens [here](https://github.com/ZenCodeLang/ZenCode/blob/3b7a3024fd0b759ecd1b2c0c6340ef3097c90845/CodeModel/src/main/java/org/openzen/zenscript/codemodel/compilation/MatchedCallArguments.java#L128)\r\n- [ ] call argument error position is incorrect\r\nThe position should be reported in between the `()`\r\n\r\n- [ ] Unknown variable has a weird reporting message, [this](https://github.com/ZenCodeLang/ZenCode/blob/f325e2f54221dd0df3cd5f29d1624a3a2c2293b9/CodeModel/src/main/java/org/openzen/zenscript/codemodel/compilation/CompileErrors.java#L192) can probably be more vague, like `cannot find X`\r\n- [ ] (opinion) `ambigious call` is too verbose\r\n\r\n```zenscript\r\nvar b = a.map\u003cstring\u003e(x =\u003e \"a\" + x);\r\n```\r\n is reporting as\r\n\r\n```\r\nAmbiguous call; multiple headers match:\r\n\u003cU@Arrays.zs:50:12\u003e(projection: function(value: string): string): string[]\r\n\u003cU@arrays_map_2.zc:7:12\u003e(projection: function(value: string): string): string[]\r\n```\r\n\r\nCould be reported as:\r\n```\r\nAmbiguous call; multiple headers match:\r\n\u003cU@Arrays.zs:50:12\u003e(function(string): string): string[]\r\n\u003cU@arrays_map_2.zc:7:12\u003e(function(string): string): string[]\r\n```\r\nThere could be more cleanup, but I think removing the parameter names are a good start\r\nJava reports this error as:\r\n```\r\nAmbiguous method call: both 'CompilerErrors.doThing(Function\u003cString, String\u003e)' and 'CompilerErrors.doThing(int[])' match.\r\n```\r\n\r\n\r\n- [ ] No operator in type position is incorrect when in call arguments\r\nThe position should be reported on the operator, instead of on the function call\r\n\r\n\r\n- [ ] Iterator errors are reported in the wrong place\r\n\r\n\r\n## General\r\n- [ ] If a class has a constructor, the ContructorMember's body never gets set and is always null\r\nhttps://github.com/ZenCodeLang/ZenCode/blob/f325e2f54221dd0df3cd5f29d1624a3a2c2293b9/CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ClassDefinition.java#L46","author":{"url":"https://github.com/jaredlll08","@type":"Person","name":"jaredlll08"},"datePublished":"2024-08-11T08:36:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/165/ZenCode/issues/165"}
| 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:3e2137cd-e5e5-f5b6-89bb-993eb708b688 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F4A:CCC2B:732430:9359B6:6990AAF2 |
| html-safe-nonce | 0da1b9dc6ee6a901ff2882a7ad031bb2bfcab604ee503aede7340ac997c9a060 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjRBOkNDQzJCOjczMjQzMDo5MzU5QjY6Njk5MEFBRjIiLCJ2aXNpdG9yX2lkIjoiNDQ5NTY3NDIzNzY1OTQyNTUyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 53c50e1f742546b92dd99ea5d61b09664ea8eb75c9197f15cbf94943ea5bef8a |
| hovercard-subject-tag | issue:2459488905 |
| 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/ZenCodeLang/ZenCode/165/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de7c75f6655abb8046606180202ea85b258610cdc74490adc8b37d5b34af2dc5/ZenCodeLang/ZenCode/issues/165 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de7c75f6655abb8046606180202ea85b258610cdc74490adc8b37d5b34af2dc5/ZenCodeLang/ZenCode/issues/165 |
| og:image:alt | I'm going to use this issue to track all the bugs I find while working on the LSP Error Reporting missing call argument reported incorrectly This should be reported as too many call arguments or be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jaredlll08 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/ZenCodeLang/ZenCode git https://github.com/ZenCodeLang/ZenCode.git |
| octolytics-dimension-user_id | 68248418 |
| octolytics-dimension-user_login | ZenCodeLang |
| octolytics-dimension-repository_id | 309683985 |
| octolytics-dimension-repository_nwo | ZenCodeLang/ZenCode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 309683985 |
| octolytics-dimension-repository_network_root_nwo | ZenCodeLang/ZenCode |
| 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 | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width