gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + gno.land: a blockchain for timeless code and fair open-source.
https://gno.land/
Other
901 stars 378 forks source link

fix: typed const conversion validation #3117

Closed petar-dambovaliev closed 6 days ago

petar-dambovaliev commented 2 weeks ago

During preprocessing, validates if typed constants are convertible. Fixes issue

Typed constants are convertible only in a lossless way. That means that we can convert floats to integers if the fractional part of the float is 0.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 15.62500% with 216 lines in your changes missing coverage. Please review. Files with missing lines Patch % Lines
gnovm/pkg/gnolang/values_conversions.go 14.62% 195 Missing and 21 partials :warning:

:loudspeaker: Thoughts on this report? Let us know!

gh-gno-bot commented 5 hours ago

Merge Requirements

The following requirements must be fulfilled before a pull request can be merged. Some requirement checks are automated and can be verified by the CI, while others need manual verification by a staff member.

These requirements are defined in this configuration file.

Automated Checks

🔴 Maintainers must be able to edit this pull request 🔴 The pull request head branch must be up-to-date with its base

Details
Maintainers must be able to edit this pull request
### If ``` 🟢 Condition met └── 🟢 On every pull request ``` ### Then ``` 🔴 Requirement not satisfied └── 🔴 Maintainer can modify this pull request ```
The pull request head branch must be up-to-date with its base
### If ``` 🟢 Condition met └── 🟢 On every pull request ``` ### Then ``` 🔴 Requirement not satisfied ```

Manual Checks

Details
The pull request description provides enough details
### If ``` 🟢 Condition met └── 🟢 Not (🔴 Pull request author is a member of the team: core-contributors) ``` ### Can be checked by - team core-contributors