Remove occurences of 'call_type'

This commit is contained in:
d0cd 2023-02-08 16:37:47 -08:00
parent 4e8cd3ce52
commit b5c22e23ee
3 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ impl Function {
#[allow(clippy::too_many_arguments)]
pub fn new(
annotations: Vec<Annotation>,
call_type: Variant,
variant: Variant,
identifier: Identifier,
input: Vec<Input>,
output: Vec<Output>,
@ -99,7 +99,7 @@ impl Function {
Function {
annotations,
variant: call_type,
variant,
identifier,
input,
output,

View File

@ -36,7 +36,7 @@ pub struct FunctionSymbol {
/// The output type of the function.
pub(crate) output_type: Type,
/// Is this function a transition, inlined, or a regular function?.
pub call_type: Variant,
pub variant: Variant,
/// The `Span` associated with the function.
pub(crate) _span: Span,
/// The inputs to the function.
@ -50,7 +50,7 @@ impl SymbolTable {
FunctionSymbol {
id,
output_type: func.output_type.clone(),
call_type: func.variant,
variant: func.variant,
_span: func.span,
input: func.input.clone(),
finalize: func.finalize.as_ref().map(|finalize| FinalizeData {

View File

@ -454,7 +454,7 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
}
// If the function is a transition function, then check that the call is not to another local transition function.
true => {
if matches!(func.call_type, Variant::Transition) && input.external.is_none() {
if matches!(func.variant, Variant::Transition) && input.external.is_none() {
self.emit_err(TypeCheckerError::cannot_invoke_call_to_local_transition_function(
input.span,
));