Merge pull request #2259 from rtfeldman/i/2227-record-layout-hang

Turn invalid record field types into runtime errors
This commit is contained in:
Folkert de Vries 2021-12-23 20:17:34 +01:00 committed by GitHub
commit db44d03e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 162 additions and 65 deletions

View file

@ -1,6 +1,9 @@
#[cfg(feature = "gen-llvm")]
use crate::helpers::llvm::assert_evals_to;
#[cfg(feature = "gen-llvm")]
use crate::helpers::llvm::expect_runtime_error_panic;
// #[cfg(feature = "gen-dev")]
// use crate::helpers::dev::assert_evals_to;
@ -2528,7 +2531,10 @@ fn list_any_empty_with_unknown_element_type() {
// Application crashed with message
// UnresolvedTypeVar compiler/mono/src/ir.rs line 3775
// Shutting down
assert_evals_to!("List.any [] (\\_ -> True)", false, bool);
//
// TODO: eventually we should insert the empty type for unresolved type
// variables, since that means they're unbound.
expect_runtime_error_panic!("List.any [] (\\_ -> True)");
}
#[test]
@ -2550,7 +2556,10 @@ fn list_all_empty_with_unknown_element_type() {
// Application crashed with message
// UnresolvedTypeVar compiler/mono/src/ir.rs line 3775
// Shutting down
assert_evals_to!("List.all [] (\\_ -> True)", false, bool);
//
// TODO: eventually we should insert the empty type for unresolved type
// variables, since that means they're unbound.
expect_runtime_error_panic!("List.all [] (\\_ -> True)");
}
#[test]