Bad range on single-branch if
- Dominant language
- No language data
- Stars
- 36
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
This fails (rightly, since we are just admitting when x=0) but highlights the body of the then-branch as the error location. Some indication that the problem is in the else-branch would be good.
````fstar
assume val f : int -> vprop
```pulse
fn test (x:int)
requires f 0
ensures f x
{
();
();
if (x = 0) {
();
();
admit();
();
();
}
}
```
````
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the Pulse example in the issue and inspect the diagnostic produced for the failing single-branch if. Trace the source-range handling for this example; done means the reported location indicates that the problem is in the else-branch rather than highlighting the then-branch body.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100