Changeset - c79f28079eb9
[Not reviewed]
MH - 4 years ago 2021-07-27 13:37:59
contact@maxhenger.nl
make all tests work again
3 files changed with 13 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/protocol/parser/pass_typing.rs
Show inline comments
 
@@ -3531,13 +3531,16 @@ impl PassTyping {
 
        use InferenceTypePart as ITP;
 
        use ConcreteTypePart as CTP;
 

	
 
        for concrete_part in concrete_type {
 
            match concrete_part {
 
                CTP::Void => parser_type.push(ITP::Void),
 
                CTP::Message => parser_type.push(ITP::Message),
 
                CTP::Message => {
 
                    parser_type.push(ITP::Message);
 
                    parser_type.push(ITP::UInt8)
 
                },
 
                CTP::Bool => parser_type.push(ITP::Bool),
 
                CTP::UInt8 => parser_type.push(ITP::UInt8),
 
                CTP::UInt16 => parser_type.push(ITP::UInt16),
 
                CTP::UInt32 => parser_type.push(ITP::UInt32),
 
                CTP::UInt64 => parser_type.push(ITP::UInt64),
 
                CTP::SInt8 => parser_type.push(ITP::SInt8),
src/protocol/parser/type_table.rs
Show inline comments
 
@@ -924,13 +924,13 @@ impl TypeTable {
 

	
 
        return Ok(());
 
    }
 

	
 
    /// Builds base component type.
 
    fn build_base_component_definition(&mut self, modules: &[Module], ctx: &mut PassCtx, definition_id: DefinitionId) -> Result<(), ParseError> {
 
        debug_assert!(self.lookup.contains_key(&definition_id), "base component already built");
 
        debug_assert!(!self.lookup.contains_key(&definition_id), "base component already built");
 

	
 
        let definition = &ctx.heap[definition_id].as_component();
 
        let root_id = definition.defined_in;
 

	
 
        // Check the argument types
 
        let mut arguments = Vec::with_capacity(definition.parameters.len());
src/protocol/tests/eval_silly.rs
Show inline comments
 
@@ -132,20 +132,20 @@ fn test_slicing_magic() {
 
                result_s64[0] + result_s64[1] == 6;
 
        }
 
    ").for_function("foo", |f| {
 
        f.call_ok(Some(Value::Bool(true)));
 
    }).for_struct("Holder", |s| { s
 
        .assert_num_monomorphs(8)
 
        .assert_has_monomorph("u8")
 
        .assert_has_monomorph("u16")
 
        .assert_has_monomorph("u32")
 
        .assert_has_monomorph("u64")
 
        .assert_has_monomorph("s8")
 
        .assert_has_monomorph("s16")
 
        .assert_has_monomorph("s32")
 
        .assert_has_monomorph("s64");
 
        .assert_has_monomorph("Holder<u8>")
 
        .assert_has_monomorph("Holder<u16>")
 
        .assert_has_monomorph("Holder<u32>")
 
        .assert_has_monomorph("Holder<u64>")
 
        .assert_has_monomorph("Holder<s8>")
 
        .assert_has_monomorph("Holder<s16>")
 
        .assert_has_monomorph("Holder<s32>")
 
        .assert_has_monomorph("Holder<s64>");
 
    });
 
}
 

	
 
#[test]
 
fn test_struct_fields() {
 
    Tester::new_single_source_expect_ok("struct field access", "
0 comments (0 inline, 0 general)