A Downcast is now reached when const-checking a for loop

I believe this occurs because the old checker stopped processing basic
blocks after a `SwitchInt`.
This commit is contained in:
Dylan MacKenzie 2019-11-13 14:48:59 -08:00
parent 9a2e53a7b3
commit a4ce2011cb
2 changed files with 2 additions and 0 deletions

View file

@ -9,6 +9,7 @@ const fn f(x: usize) -> usize {
//~| ERROR E0017
//~| ERROR E0080
//~| ERROR E0744
//~| ERROR E0019
sum += i;
}
sum

View file

@ -11,4 +11,5 @@ fn main() {
//~| ERROR `for` is not allowed in a `const`
//~| ERROR references in constants may only refer to immutable values
//~| ERROR evaluation of constant value failed
//~| ERROR constant contains unimplemented expression type
}