mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Merge pull request #2259 from rtfeldman/i/2227-record-layout-hang
Turn invalid record field types into runtime errors
This commit is contained in:
commit
db44d03e66
10 changed files with 162 additions and 65 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue