mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
fix infinite recursion in dev rc generation
This commit is contained in:
parent
0284248320
commit
507d339691
3 changed files with 20 additions and 10 deletions
|
@ -87,7 +87,7 @@ pub fn refcount_stmt<'a>(
|
||||||
ctx,
|
ctx,
|
||||||
layout_interner,
|
layout_interner,
|
||||||
layout,
|
layout,
|
||||||
modify,
|
&ModifyRc::Dec(*structure),
|
||||||
following,
|
following,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
mod pattern_match {
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use crate::helpers::with_larger_debug_stack;
|
use crate::helpers::with_larger_debug_stack;
|
||||||
|
@ -3926,7 +3926,7 @@ mod pattern_match {
|
||||||
#[cfg(feature = "gen-dev")]
|
#[cfg(feature = "gen-dev")]
|
||||||
use crate::helpers::dev::assert_evals_to;
|
use crate::helpers::dev::assert_evals_to;
|
||||||
|
|
||||||
use super::RocList;
|
use super::{RocList, RocStr};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn unary_exact_size_match() {
|
fn unary_exact_size_match() {
|
||||||
|
@ -4122,6 +4122,19 @@ mod pattern_match {
|
||||||
RocList<u8>
|
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]
|
#[test]
|
||||||
|
|
|
@ -89,13 +89,10 @@ pub fn helper(
|
||||||
// while you're working on the dev backend!
|
// while you're working on the dev backend!
|
||||||
{
|
{
|
||||||
// println!("=========== Procedures ==========");
|
// println!("=========== Procedures ==========");
|
||||||
// if pretty_print_ir_symbols() {
|
// let pretty = pretty_print_ir_symbols();
|
||||||
// println!("");
|
// println!("");
|
||||||
// for proc in procedures.values() {
|
// for proc in procedures.values() {
|
||||||
// println!("{}", proc.to_pretty(200));
|
// println!("{}", proc.to_pretty(&layout_interner, 200, pretty));
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// println!("{:?}", procedures.values());
|
|
||||||
// }
|
// }
|
||||||
// println!("=================================\n");
|
// println!("=================================\n");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue