Seam assert pre-scan misses assertions nested inside expressions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 14
- Forks
- 2
- Avg merge
- 13h 13m
- Merged PRs (30d)
- 70
Description
The seam-contract pre-scan collects assert(var == const) only from selected block-bearing expressions such as spawn, if, and loops. It skipped assertions inside ordinary expression containers.
Example:
fn f(value: i32) -> i32 {
let result = 1 + if 1 == 1 {
assert(value == 42);
2
} else {
3
};
return result;
}
The assertion is valid Vx and should contribute the contract value == 42.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the seam-contract pre-scan logic that handles block-bearing expressions such as spawn, if, and loops, then reproduce the supplied function with an assertion nested in an expression container. Done means the nested assert(value == 42) contributes the seam contract just like assertions in the currently handled expressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100