@@ -333,7 +333,7 @@ fn test_try_catch() {
333333#[ rstest]
334334#[ case:: add_strings( r#"def add(x, y): x + y; | add("hello", "world")"# , true ) ]
335335#[ case:: add_numbers( "def add(x, y): x + y; | add(1, 2)" , true ) ]
336- #[ case:: add_mixed_types( r#"def add(x, y): x + y; | add(1, "hello")"# , false ) ]
336+ #[ case:: add_mixed_types( r#"def add(x, y): x + y; | add(1, "hello")"# , true ) ]
337337#[ case:: add_mixed_types_reversed( r#"def add(x, y): x + y; | add("hello", 1)"# , true ) ] // string+any->string overload matches
338338#[ case:: string_concat_in_fn( r#"def greet(name): "hello " + name; | greet("world")"# , true ) ]
339339#[ case:: unary_negation( "-42" , true ) ]
@@ -415,8 +415,8 @@ fn test_macro_with_multiple_params() {
415415// User-Defined Function Type Checking
416416
417417#[ rstest]
418- #[ case:: arg_type_mismatch( r#"def add(x, y): x + y; | add(1, "hello")"# , false ) ]
419- #[ case:: return_type_propagation( r#"def get_num(): 42; | get_num() + "hello""# , false ) ]
418+ #[ case:: arg_type_mismatch( r#"def add(x, y): x + y; | add(1, "hello")"# , true ) ]
419+ #[ case:: return_type_propagation( r#"def get_num(): 42; | get_num() + "hello""# , true ) ]
420420#[ case:: chained_calls( r#"def double(x): x + x; | def negate(x): 0 - x; | double(negate(1))"# , true ) ]
421421#[ case:: string_plus_number( r#"def greet(): "hello"; | greet() + 1"# , true ) ]
422422#[ case:: string_minus_number( r#"def greet(): "hello"; | greet() - 1"# , false ) ]
@@ -447,7 +447,7 @@ fn test_user_function_type_checking(#[case] code: &str, #[case] should_succeed:
447447#[ case:: number_mul_string( r#"3 * "x""# , false , "number * string" ) ]
448448#[ case:: string_minus_number( r#""abc" - 1"# , false , "string - number" ) ]
449449#[ case:: string_div_number( r#""abc" / 2"# , false , "string / number" ) ]
450- #[ case:: number_add_string( r#"1 + "world""# , false , "number + string" ) ]
450+ #[ case:: number_add_string( r#"1 + "world""# , true , "number + string" ) ]
451451#[ case:: string_mul_string( r#""a" * "b""# , false , "string * string" ) ]
452452#[ case:: string_div_string( r#""a" / "b""# , false , "string / string" ) ]
453453#[ case:: string_minus_string( r#""a" - "b""# , false , "string - string" ) ]
@@ -524,7 +524,7 @@ fn test_equality_op_type_errors(#[case] code: &str, #[case] should_succeed: bool
524524#[ case:: let_num_minus_string( r#"let x = 1 | x - "str""# , false , "let number binding minus string" ) ]
525525#[ case:: let_num_mul_string( r#"let x = 1 | x * "str""# , false , "let number binding times string" ) ]
526526#[ case:: let_num_div_string( r#"let x = 1 | x / "str""# , false , "let number binding div string" ) ]
527- #[ case:: let_num_plus_string( r#"let x = 1 | x + "str""# , false , "let number binding plus string" ) ]
527+ #[ case:: let_num_plus_string( r#"let x = 1 | x + "str""# , true , "let number binding plus string" ) ]
528528#[ case:: let_string_minus_num( r#"let x = "hello" | x - 1"# , false , "let string binding minus number" ) ]
529529#[ case:: let_string_div_num( r#"let x = "hello" | x / 2"# , false , "let string binding div number" ) ]
530530#[ case:: let_string_mul_string( r#"let x = "hello" | x * "world""# , false , "let string binding times string" ) ]
0 commit comments