Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: untyped values use calling builtin function's type (#1423)
<!-- please provide a detailed description of the changes made in this pull request. --> Addresses #1085 The call to `convConst` should include the type in this case. This happens while processing a `CallExpr` and in this case the expression is a function call to the built function `uint64`. We have the expected type, so use when converting the constant to a typed value. If this type is still nil, then it will behave as it does currently. However, the concrete type should only be supplied to `convertConst` if the call expression's type and the constant expression's type both have the same underlying _unsigned type_ -- the base type of any value of these types were they to be evaluated as literals before being assigned a type. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
- Loading branch information