diff --git a/runtime/sema/check_invocation_expression.go b/runtime/sema/check_invocation_expression.go index d14550b6eb..cd8c381b37 100644 --- a/runtime/sema/check_invocation_expression.go +++ b/runtime/sema/check_invocation_expression.go @@ -504,8 +504,8 @@ func (checker *Checker) checkInvocation( // The invokable type might have special checks for the type parameters. - if functionType.TypePrametersCheck != nil { - functionType.TypePrametersCheck( + if functionType.TypeArgumentsCheck != nil { + functionType.TypeArgumentsCheck( checker.memoryGauge, typeArguments, invocationExpression.TypeArguments, diff --git a/runtime/sema/type.go b/runtime/sema/type.go index f1d5e18f23..20db7a64cc 100644 --- a/runtime/sema/type.go +++ b/runtime/sema/type.go @@ -2907,7 +2907,7 @@ type FunctionType struct { ReturnTypeAnnotation TypeAnnotation Arity *Arity ArgumentExpressionsCheck ArgumentExpressionsCheck - TypePrametersCheck TypeParametersCheck + TypeArgumentsCheck TypeArgumentsCheck Members *StringMemberOrderedMap TypeParameters []*TypeParameter Parameters []Parameter @@ -3378,7 +3378,7 @@ type ArgumentExpressionsCheck func( invocationRange ast.Range, ) -type TypeParametersCheck func( +type TypeArgumentsCheck func( memoryGauge common.MemoryGauge, typeArguments *TypeParameterTypeOrderedMap, astTypeArguments []*ast.TypeAnnotation, diff --git a/runtime/stdlib/range.go b/runtime/stdlib/range.go index 84132859a6..9d493ccdaf 100644 --- a/runtime/stdlib/range.go +++ b/runtime/stdlib/range.go @@ -76,7 +76,7 @@ var inclusiveRangeConstructorFunctionType = func() *sema.FunctionType { ), // `step` parameter is optional Arity: &sema.Arity{Min: 2, Max: 3}, - TypePrametersCheck: func( + TypeArgumentsCheck: func( memoryGauge common.MemoryGauge, typeArguments *sema.TypeParameterTypeOrderedMap, astTypeArguments []*ast.TypeAnnotation,