Closed
Description
There seems to be an issue with closures in records and the type checker. This code segfaults with a leaked memory message:
type t<T> = { f: fn() -> T };
fn f<T>(_x: t<T>) {}
fn main() {
let x: t<()> = { f: { || () } };
f(x);
}
However, if you remove : t<()>
from let x: t<()> = { f: { || () } };
, it works just fine.