mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-29 03:35:10 +03:00
fix imported static access bug
This commit is contained in:
parent
c37ff19ae0
commit
147a87ec24
@ -36,16 +36,15 @@ impl<F: Field + PrimeField, G: GroupType<F>> ConstrainedProgram<F, G> {
|
|||||||
span: Span,
|
span: Span,
|
||||||
) -> Result<ConstrainedValue<F, G>, ExpressionError> {
|
) -> Result<ConstrainedValue<F, G>, ExpressionError> {
|
||||||
// Get defined circuit
|
// Get defined circuit
|
||||||
let circuit = match self.enforce_expression(
|
let circuit = self
|
||||||
cs,
|
.enforce_expression(
|
||||||
file_scope.clone(),
|
cs,
|
||||||
function_scope.clone(),
|
file_scope.clone(),
|
||||||
expected_type,
|
function_scope.clone(),
|
||||||
*circuit_identifier.clone(),
|
expected_type,
|
||||||
)? {
|
*circuit_identifier.clone(),
|
||||||
ConstrainedValue::CircuitDefinition(circuit_definition) => circuit_definition,
|
)?
|
||||||
value => return Err(ExpressionError::undefined_circuit(value.to_string(), span)),
|
.extract_circuit(span.clone())?;
|
||||||
};
|
|
||||||
|
|
||||||
// Find static circuit function
|
// Find static circuit function
|
||||||
let matched_function = circuit.members.into_iter().find(|member| match member {
|
let matched_function = circuit.members.into_iter().find(|member| match member {
|
||||||
|
Loading…
Reference in New Issue
Block a user