fix infinite recursion in dev rc generation

This commit is contained in:
Brendan Hansknecht 2024-07-15 09:04:50 -07:00
parent 0284248320
commit 507d339691
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
3 changed files with 20 additions and 10 deletions

View file

@ -3912,7 +3912,7 @@ fn list_range_length_overflow() {
);
}
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
mod pattern_match {
#[allow(unused_imports)]
use crate::helpers::with_larger_debug_stack;
@ -3926,7 +3926,7 @@ mod pattern_match {
#[cfg(feature = "gen-dev")]
use crate::helpers::dev::assert_evals_to;
use super::RocList;
use super::{RocList, RocStr};
#[test]
fn unary_exact_size_match() {
@ -4122,6 +4122,19 @@ mod pattern_match {
RocList<u8>
)
}
#[test]
fn list_str() {
assert_evals_to!(
r#"
when ["d"] is
[alone] -> [alone]
other -> other
"#,
RocList::from_slice(&[RocStr::from("d")]),
RocList<RocStr>
)
}
}
#[test]

View file

@ -89,13 +89,10 @@ pub fn helper(
// while you're working on the dev backend!
{
// println!("=========== Procedures ==========");
// if pretty_print_ir_symbols() {
// println!("");
// for proc in procedures.values() {
// println!("{}", proc.to_pretty(200));
// }
// } else {
// println!("{:?}", procedures.values());
// let pretty = pretty_print_ir_symbols();
// println!("");
// for proc in procedures.values() {
// println!("{}", proc.to_pretty(&layout_interner, 200, pretty));
// }
// println!("=================================\n");