diff --git a/schala-lang/language/src/reduced_ir/mod.rs b/schala-lang/language/src/reduced_ir/mod.rs index 8a37360..2e607d7 100644 --- a/schala-lang/language/src/reduced_ir/mod.rs +++ b/schala-lang/language/src/reduced_ir/mod.rs @@ -356,9 +356,13 @@ impl ast::Pattern { spec => return Err(format!("Unexpected VarOrName symbol: {:?}", spec).into()) } }, - ast::Pattern::Record(_name, _members/*Vec<(Rc, Pattern)>*/) => { - unimplemented!() - }, + ast::Pattern::Record(name, _specified_members/*Vec<(Rc, Pattern)>*/) => { + let symbol = symbol_table.lookup_symbol(&name.id).unwrap(); + match symbol.spec() { + SymbolSpec::RecordConstructor { index: _, members: _, type_id: _ } => unimplemented!(), + spec => return Err(format!("Unexpected Record pattern symbol: {:?}", spec).into()) + } + } }) } }