stacks-core
stacks-core copied to clipboard
Fix callable type issue (DO NOT MERGE)
Description
This fixes the issue described in #4622. This is still a work in progress, as I am not sure yet if this is the appropriate fix or if there is a call to concretize on the type missing somewhere.
It also needs to be gated on an epoch or on a new version of Clarity.
Applicable issues
- fixes #4622
Additional info (benefits, drawbacks, caveats)
Checklist
- [ ] Test coverage for new or modified code paths
- [ ] Changelog is updated
- [ ] Required documentation changes (e.g.,
docs/rpc/openapi.yamlandrpc-endpoints.mdfor v2 endpoints,event-dispatcher.mdfor new events) - [ ] New clarity functions have corresponding PR in
clarity-benchmarkingrepo - [ ] New integration test(s) added to
bitcoin-tests.yml
Codecov Report
Attention: Patch coverage is 93.33333% with 4 lines in your changes are missing coverage. Please review.
Project coverage is 83.32%. Comparing base (
c383bdd) to head (c9de60b).
Additional details and impacted files
@@ Coverage Diff @@
## next #4623 +/- ##
==========================================
+ Coverage 83.14% 83.32% +0.17%
==========================================
Files 470 470
Lines 332698 332758 +60
Branches 317 317
==========================================
+ Hits 276635 277256 +621
+ Misses 56055 55494 -561
Partials 8 8
| Files | Coverage Δ | |
|---|---|---|
| ...ity/src/vm/analysis/type_checker/v2_1/tests/mod.rs | 99.85% <100.00%> (+<0.01%) |
:arrow_up: |
| clarity/src/vm/analysis/type_checker/v2_1/mod.rs | 90.49% <50.00%> (-0.27%) |
:arrow_down: |
... and 45 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c383bdd...c9de60b. Read the comment docs.
@obycode the fix doesn't seem to work for response types.
#[test]
fn test_replace_at_response_err_callable() {
let contract = r#"(replace-at?
(list
(err 'SX3M0F9YG3TS7YZDDV7B22H2C5J0BHG0WD0T3QSSN.DAHdSGMHgxMWaithtPBEqfuTWZGMqy)
(ok 5)
)
u0
(err 'SX3M0F9YG3TS7YZDDV7B22H2C5J0BHG0WD0T3QSSN.DAHdSGMHgxMWaithtPBEqfuTWZGMqy)
)"#;
assert!(mem_type_check(contract).is_ok());
}