Description
struct Other<'a>(&'a i32);
enum Test<'a> {
C1(Other<'a>)
}
impl<'a> Test<'a> {
fn test(&self) -> i32 {
match self {
Self::C1(c) => *c.0
}
}
}
Open this code snippet in the playground
The generated F* for the test
method from the example is:
let impl__test (self: t_Test) : i32 =
match self with
| (Test_C1 c: t_Test) -> c._0
F* rejects it with Type ascriptions within patterns are only allowed on variables