Closed
Description
This is a slight variation on #1467:
fn main() {
let x = 3;
fn blah(_a: fn()) {}
blah({|| log(error, x); });
}
Compiling that crashes when trans tries to resolve the upvar for x
inside the block. I guess typeck should refuse to convert something that has upvars into a bare function. (Or, if we end up dumping bare functions, this would be moot too.)
Metadata
Metadata
Assignees
Labels
No labels