Changeset - 9d4f988400d0
[Not reviewed]
0 1 0
mh - 4 years ago 2021-12-12 15:16:20
contact@maxhenger.nl
Add failing polymorph test
1 file changed with 16 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/protocol/tests/parser_validation.rs
Show inline comments
 
@@ -409,7 +409,22 @@ fn test_correct_tuple_members() {
 

	
 
#[test]
 
fn test_correct_tuple_polymorph_args() {
 
    todo!("write");
 
    Tester::new_single_source_expect_ok(
 
        "single tuple arg",
 
        "
 
        union Option<T>{ Some(T), None }
 
        func thing() -> u32 {
 
            auto a = Option<()>::None;
 
            auto b = Option<(u32, u64)>::None;
 
            auto c = Option<(Option<(u8, s8)>, Option<(s8, u8)>)>::None;
 
            return 0;
 
        }
 
        "
 
    ).for_union("Option", |u| { u
 
        .assert_has_monomorph("Option<()>")
 
        .assert_has_monomorph("Option<(u32, u64)>")
 
        .assert_has_monomorph("Option<(Option<(u8,s8)>,Option<(s8,u8)>)>");
 
    });
 
}
 

	
 
#[test]
0 comments (0 inline, 0 general)