hyperledger-solang / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.27k stars 216 forks source link

Represent type(f) correctly in the ast #1609

Closed seanyoung closed 11 months ago

seanyoung commented 11 months ago

This makes the ast correct, and also the following code is now parsed correctly:

        function foo() {
                type(int);
        }

type(enum-type).min or type(enum).min is now supported.

This fixes all the issues wrt type(T) in the solc tests.

codecov[bot] commented 11 months ago

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (68b59a4) 87.94% compared to head (e2819a3) 88.14%.

Files Patch % Lines
src/codegen/expression.rs 82.14% 5 Missing :warning:
src/sema/eval.rs 85.00% 3 Missing :warning:
src/sema/expression/member_access.rs 98.38% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1609 +/- ## ========================================== + Coverage 87.94% 88.14% +0.19% ========================================== Files 137 137 Lines 65902 65992 +90 ========================================== + Hits 57959 58166 +207 + Misses 7943 7826 -117 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

seanyoung commented 11 months ago

If there are no further comments, I'll merge