FStarLang / FStarLang/FStar

Failure of type inference with repeated variables

Open
#1,007 3 comments 0 reactions 1 assignee Claimed by @aseemr View on GitHub
area/proof-assistant component/typechecker component/unifier good first issue kind/enhancement milestone/everest-v1
Dominant language
F*
Stars
3.1k
Forks
266
Avg merge
21h 1m
Merged PRs (30d)
54

Description

Lax-typechecking the following snippet

```F#
let f (x y : int) (w:(b:bool & (if b then equals x y else equals y x))) =
match w with
| (| b, Refl |) -> ()
```

fails with the error
```
(Error) (equals (?26524 x y w b) (?26524 x y w b)) is not a subtype of the expected type (match b with
| true -> (equals x y)
|_ -> (equals y x))
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.