Closed kriomant closed 7 years ago
Also occurs on beta.
The regression here is only that this doesn't ICE on stable, presumably because the relevant code isn't reached. Still a regression once it goes through the trains, though.
@Mark-Simulacrum yeah its an ICE related to the freshly stabilized closure to fn coercion feature.
Smaller reproducing example:
fn foo<T>(_: T) {
let _: fn() = || {};
}
fn main() {
foo(0i8);
}
Hmm apparently the TypeFlags::HAS_PARAMS
flag is still set (all other flags are not). No idea what that means though. Similar issue #36381 got fixed by making the check less strict.
@est31 Well that's a consequence of there being type parameters. And it's in the ICE message. So the immediate conclusion is that parameters were not substituted correctly at some point.
Specifically, this operation is missing for source_ty
below it, for ClosureFnPointer
.
Following code causes internal compiler error on nighly:
Error: