mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-25 10:24:07 +03:00
fix
This commit is contained in:
parent
c54c4aea2d
commit
af45146282
@ -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),
|
||||
}),
|
||||
},
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user