solang
solang copied to clipboard
Various fallback improvements
Allow the following:
contract A {
// Take raw calldata as argument and return return data
fallback(bytes calldata input) external payable (bytes memory) {}
}
Allow a function to be called fallback:
contract A {
// Will give a warning that's not a fallback function,
// just a regular functon
function fallback() public {}
}
This should make proxy contracts much easier to implement.
Also fixes all fallback/receive related failures in the evm tests.
Codecov Report
Attention: 35 lines in your changes are missing coverage. Please review.
Comparison is base (
00bcabb) 88.44% compared to head (1a4cef6) 88.42%.
| Files | Patch % | Lines |
|---|---|---|
| src/lir/converter/expression.rs | 0.00% | 23 Missing :warning: |
| src/codegen/cfg.rs | 0.00% | 10 Missing :warning: |
| src/codegen/mod.rs | 0.00% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1611 +/- ##
==========================================
- Coverage 88.44% 88.42% -0.03%
==========================================
Files 150 150
Lines 68322 68503 +181
==========================================
+ Hits 60429 60572 +143
- Misses 7893 7931 +38
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@seanyoung I'll be preparing a release in the upcoming days, I think this would be nice to have in :)