This commit is contained in:
evan-schott 2024-06-12 10:58:24 -07:00
parent c54c4aea2d
commit af45146282
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ impl FunctionStub {
span: Default::default(),
id: Default::default(),
type_: Type::Composite(CompositeType {
id: Identifier::from(loc.name()),
id: Identifier::from(loc.resource()),
program: Some(ProgramId::from(loc.program_id()).name.name),
}),
},

View File

@ -1186,7 +1186,7 @@ impl<'a, N: Network> TypeChecker<'a, N> {
if matches!(input_var.type_(), Type::Tuple(_)) {
self.emit_err(TypeCheckerError::function_cannot_take_tuple_as_input(input_var.span()))
}
// Check that the input parameter is not a record.
// Make sure only transitions can take a record as an input.
else if let Type::Composite(struct_) = input_var.type_() {
// Throw error for undefined type.
if !function.variant.is_transition() {