From 5cec2544b301f42854df1eebd6e3ba832690045f Mon Sep 17 00:00:00 2001 From: KtorZ Date: Thu, 21 Mar 2024 16:13:54 +0100 Subject: [PATCH] Nonsensical prints to be removed. --- crates/aiken-lang/src/tests/check.rs | 6 ++++-- crates/aiken-lang/src/tipo/environment.rs | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/aiken-lang/src/tests/check.rs b/crates/aiken-lang/src/tests/check.rs index d0da79ea..cd3cced1 100644 --- a/crates/aiken-lang/src/tests/check.rs +++ b/crates/aiken-lang/src/tests/check.rs @@ -1970,12 +1970,14 @@ fn forbid_expect_into_nested_opaque_in_record_without_typecasting() { type Foo { foo: Thing } - fn bar(thing: Foo) { - expect Foo { foo: Thing { inner } } : Foo = thing + fn bar(f: Foo) { + expect Foo { foo: Thing { inner } } : Foo = f Void } "#; + panic!(""); + assert!(matches!( check(parse(source_code)), Err((_, Error::ExpectOnOpaqueType { .. })) diff --git a/crates/aiken-lang/src/tipo/environment.rs b/crates/aiken-lang/src/tipo/environment.rs index 481eda1b..27b61155 100644 --- a/crates/aiken-lang/src/tipo/environment.rs +++ b/crates/aiken-lang/src/tipo/environment.rs @@ -1408,6 +1408,9 @@ impl<'a> Environment<'a> { return Ok(()); } + println!("lhs: {lhs:#?}"); + println!("rhs: {rhs:#?}"); + // TODO: maybe we also care to check is_link? if allow_cast && (lhs.is_data() || rhs.is_data())