chore: this test doesn't make sense anymore

This commit is contained in:
rvcas 2024-06-12 17:22:05 -04:00 committed by Lucas
parent 8f343abaa1
commit aeb079334e
1 changed files with 1 additions and 25 deletions

View File

@ -2654,31 +2654,7 @@ fn if_soft_cast_no_scope_leak() {
} }
#[test] #[test]
fn if_soft_cast_not_data_single_constr() { fn if_soft_cast_not_data() {
let source_code = r#"
pub type Foo {
a: Int
}
pub fn foo(foo: Foo) -> Int {
if foo is Foo { a }: Foo {
a
} else {
0
}
}
"#;
let (warnings, _ast) = check(parse(source_code)).unwrap();
assert!(matches!(
warnings[0],
Warning::SingleConstructorExpect { .. }
))
}
#[test]
fn if_soft_cast_not_data_multi_constr() {
let source_code = r#" let source_code = r#"
pub type Foo { pub type Foo {
Bar { a: Int } Bar { a: Int }