Documentation ¶
Index ¶
- Constants
- Variables
- func AreCompatibleEquatableTypes(leftType, rightType Type) bool
- func CheckAddressLiteral(memoryGauge common.MemoryGauge, expression *ast.IntegerExpression, ...) bool
- func CheckFixedPointLiteral(memoryGauge common.MemoryGauge, expression *ast.FixedPointExpression, ...) bool
- func CheckIntegerLiteral(memoryGauge common.MemoryGauge, expression *ast.IntegerExpression, ...) bool
- func FailableCastCanSucceed(subType, superType Type) bool
- func FromStringFunctionDocstring(ty Type) string
- func FunctionEntryPointDeclaration(program *ast.Program) *ast.FunctionDeclaration
- func GetFieldNames(members []*Member) []string
- func IsNilType(ty Type) bool
- func IsProperSubType(subType Type, superType Type) bool
- func IsSameTypeKind(subType Type, superType Type) bool
- func IsSubType(subType Type, superType Type) bool
- func IsValidAssignmentTargetExpression(expression ast.Expression) bool
- func IsValidCharacter(s string) bool
- func IsValidDictionaryKeyType(keyType Type) bool
- func IsValidEventParameterType(t Type, results map[*Member]bool) bool
- func RequiredArgumentCount(count int) *int
- func VisitThisAndNested(t Type, visit func(ty Type))
- type AccessCheckMode
- type AddressContractNamesResolver
- type AddressType
- func (*AddressType) Equal(other Type) bool
- func (t *AddressType) GetMembers() map[string]MemberResolver
- func (*AddressType) ID() TypeID
- func (*AddressType) IsEquatable() bool
- func (*AddressType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *AddressType) IsImportable(_ map[*Member]bool) bool
- func (*AddressType) IsInvalidType() bool
- func (*AddressType) IsResourceType() bool
- func (*AddressType) IsStorable(_ map[*Member]bool) bool
- func (*AddressType) IsSuperType() bool
- func (*AddressType) IsType()
- func (*AddressType) MaxInt() *big.Int
- func (*AddressType) MinInt() *big.Int
- func (*AddressType) QualifiedString() string
- func (t *AddressType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *AddressType) RewriteWithRestrictedTypes() (Type, bool)
- func (*AddressType) String() string
- func (t *AddressType) Tag() TypeTag
- func (*AddressType) TypeAnnotationState() TypeAnnotationState
- func (*AddressType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type AlwaysFailingNonResourceCastingTypeError
- type AlwaysFailingResourceCastingTypeError
- type AmbiguousRestrictedTypeError
- type ArgumentCountError
- type ArgumentExpressionsCheck
- type ArrayExpressionTypes
- type ArrayType
- type AssignmentStatementTypes
- type AssignmentToConstantError
- type AssignmentToConstantMemberError
- type BeforeExtractor
- func (e *BeforeExtractor) ExtractBefore(expression ast.Expression) ast.ExpressionExtraction
- func (e *BeforeExtractor) ExtractFunction(_ *ast.ExpressionExtractor, expression *ast.FunctionExpression) ast.ExpressionExtraction
- func (e *BeforeExtractor) ExtractInvocation(extractor *ast.ExpressionExtractor, expression *ast.InvocationExpression) ast.ExpressionExtraction
- type BinaryExpressionTypes
- type BinaryOperationKind
- type CapabilityType
- func (t *CapabilityType) BaseType() Type
- func (t *CapabilityType) Equal(other Type) bool
- func (t *CapabilityType) GetMembers() map[string]MemberResolver
- func (t *CapabilityType) ID() TypeID
- func (t *CapabilityType) Instantiate(typeArguments []Type, _ func(err error)) Type
- func (*CapabilityType) IsEquatable() bool
- func (*CapabilityType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *CapabilityType) IsImportable(_ map[*Member]bool) bool
- func (t *CapabilityType) IsInvalidType() bool
- func (*CapabilityType) IsResourceType() bool
- func (*CapabilityType) IsStorable(_ map[*Member]bool) bool
- func (*CapabilityType) IsType()
- func (t *CapabilityType) QualifiedString() string
- func (t *CapabilityType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *CapabilityType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *CapabilityType) String() string
- func (t *CapabilityType) Tag() TypeTag
- func (t *CapabilityType) TypeAnnotationState() TypeAnnotationState
- func (t *CapabilityType) TypeArguments() []Type
- func (t *CapabilityType) TypeParameters() []*TypeParameter
- func (t *CapabilityType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type CastTypes
- type CheckHandlerFunc
- type Checker
- func (checker *Checker) Check() error
- func (checker *Checker) CheckProgram(program *ast.Program)
- func (checker *Checker) CheckStatement(element ast.Statement)
- func (checker *Checker) CheckerError() *CheckerError
- func (checker *Checker) ConvertType(t ast.Type) Type
- func (checker *Checker) ConvertTypeAnnotation(typeAnnotation *ast.TypeAnnotation) *TypeAnnotation
- func (checker *Checker) CurrentPurityScope() PurityCheckScope
- func (checker *Checker) EnforcePurity(operation ast.Element, purity FunctionPurity)
- func (checker *Checker) EntryPointParameters() []*Parameter
- func (checker *Checker) InNewPurityScope(enforce bool, f func())
- func (checker *Checker) IsChecked() bool
- func (checker *Checker) ObserveImpureOperation(operation ast.Element)
- func (checker *Checker) PopPurityScope() PurityCheckScope
- func (checker *Checker) PushNewPurityScope(enforce bool, depth int)
- func (checker *Checker) ResetErrors()
- func (checker *Checker) SetMemoryGauge(gauge common.MemoryGauge)
- func (checker *Checker) SubChecker(program *ast.Program, location common.Location) (*Checker, error)
- func (checker *Checker) TypeActivationDepth() int
- func (checker *Checker) ValueActivationDepth() int
- func (checker *Checker) VisitArrayExpression(expression *ast.ArrayExpression) Type
- func (checker *Checker) VisitAssignmentStatement(assignment *ast.AssignmentStatement) (_ struct{})
- func (checker *Checker) VisitBinaryExpression(expression *ast.BinaryExpression) Type
- func (checker *Checker) VisitBoolExpression(_ *ast.BoolExpression) Type
- func (checker *Checker) VisitBreakStatement(statement *ast.BreakStatement) (_ struct{})
- func (checker *Checker) VisitCastingExpression(expression *ast.CastingExpression) Type
- func (checker *Checker) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) (_ struct{})
- func (checker *Checker) VisitConditionalExpression(expression *ast.ConditionalExpression) Type
- func (checker *Checker) VisitContinueStatement(statement *ast.ContinueStatement) (_ struct{})
- func (checker *Checker) VisitCreateExpression(expression *ast.CreateExpression) Type
- func (checker *Checker) VisitDestroyExpression(expression *ast.DestroyExpression) (resultType Type)
- func (checker *Checker) VisitDictionaryExpression(expression *ast.DictionaryExpression) Type
- func (checker *Checker) VisitEmitStatement(statement *ast.EmitStatement) (_ struct{})
- func (checker *Checker) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) struct{}
- func (checker *Checker) VisitExpression(expr ast.Expression, expectedType Type) Type
- func (checker *Checker) VisitExpressionStatement(statement *ast.ExpressionStatement) (_ struct{})
- func (checker *Checker) VisitExpressionWithForceType(expr ast.Expression, expectedType Type, forceType bool) Type
- func (checker *Checker) VisitFieldDeclaration(_ *ast.FieldDeclaration) struct{}
- func (checker *Checker) VisitFixedPointExpression(expression *ast.FixedPointExpression) Type
- func (checker *Checker) VisitForStatement(statement *ast.ForStatement) (_ struct{})
- func (checker *Checker) VisitForceExpression(expression *ast.ForceExpression) Type
- func (checker *Checker) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) (_ struct{})
- func (checker *Checker) VisitFunctionExpression(expression *ast.FunctionExpression) Type
- func (checker *Checker) VisitIdentifierExpression(expression *ast.IdentifierExpression) Type
- func (checker *Checker) VisitIfStatement(statement *ast.IfStatement) (_ struct{})
- func (checker *Checker) VisitImportDeclaration(declaration *ast.ImportDeclaration) struct{}
- func (checker *Checker) VisitIndexExpression(expression *ast.IndexExpression) Type
- func (checker *Checker) VisitIntegerExpression(expression *ast.IntegerExpression) Type
- func (checker *Checker) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) (_ struct{})
- func (checker *Checker) VisitInvocationExpression(invocationExpression *ast.InvocationExpression) Type
- func (checker *Checker) VisitMemberExpression(expression *ast.MemberExpression) Type
- func (checker *Checker) VisitNilExpression(_ *ast.NilExpression) Type
- func (checker *Checker) VisitPathExpression(expression *ast.PathExpression) Type
- func (checker *Checker) VisitPragmaDeclaration(p *ast.PragmaDeclaration) (_ struct{})
- func (checker *Checker) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) Type
- func (checker *Checker) VisitReturnStatement(statement *ast.ReturnStatement) (_ struct{})
- func (checker *Checker) VisitSpecialFunctionDeclaration(declaration *ast.SpecialFunctionDeclaration) struct{}
- func (checker *Checker) VisitStringExpression(expression *ast.StringExpression) Type
- func (checker *Checker) VisitSwapStatement(swap *ast.SwapStatement) (_ struct{})
- func (checker *Checker) VisitSwitchStatement(statement *ast.SwitchStatement) (_ struct{})
- func (checker *Checker) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) (_ struct{})
- func (checker *Checker) VisitUnaryExpression(expression *ast.UnaryExpression) Type
- func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) (_ struct{})
- func (checker *Checker) VisitVoidExpression(_ *ast.VoidExpression) Type
- func (checker *Checker) VisitWhileStatement(statement *ast.WhileStatement) (_ struct{})
- type CheckerError
- type CompositeKindMismatchError
- type CompositeKindedType
- type CompositeType
- func (t *CompositeType) Equal(other Type) bool
- func (t *CompositeType) ExplicitInterfaceConformanceSet() *InterfaceSet
- func (t *CompositeType) FieldPosition(name string, declaration *ast.CompositeDeclaration) ast.Position
- func (t *CompositeType) GetCompositeKind() common.CompositeKind
- func (t *CompositeType) GetContainerType() Type
- func (t *CompositeType) GetLocation() common.Location
- func (t *CompositeType) GetMembers() map[string]MemberResolver
- func (t *CompositeType) GetNestedTypes() *StringTypeOrderedMap
- func (t *CompositeType) ID() TypeID
- func (t *CompositeType) InterfaceType() *InterfaceType
- func (t *CompositeType) IsContainerType() bool
- func (t *CompositeType) IsEquatable() bool
- func (t *CompositeType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *CompositeType) IsImportable(results map[*Member]bool) bool
- func (*CompositeType) IsInvalidType() bool
- func (t *CompositeType) IsResourceType() bool
- func (t *CompositeType) IsStorable(results map[*Member]bool) bool
- func (*CompositeType) IsType()
- func (t *CompositeType) MemberMap() *StringMemberOrderedMap
- func (t *CompositeType) QualifiedIdentifier() string
- func (t *CompositeType) QualifiedString() string
- func (t *CompositeType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *CompositeType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *CompositeType) SetContainerType(containerType Type)
- func (t *CompositeType) String() string
- func (t *CompositeType) Tag() TypeTag
- func (*CompositeType) TypeAnnotationState() TypeAnnotationState
- func (t *CompositeType) TypeRequirements() []*CompositeType
- func (*CompositeType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type Config
- type ConformanceError
- type ConstantSizedArrayLiteralSizeError
- type ConstantSizedType
- func (*ConstantSizedType) AllowsValueIndexingAssignment() bool
- func (t *ConstantSizedType) ElementType(_ bool) Type
- func (t *ConstantSizedType) Equal(other Type) bool
- func (t *ConstantSizedType) GetMembers() map[string]MemberResolver
- func (t *ConstantSizedType) ID() TypeID
- func (t *ConstantSizedType) IndexingType() Type
- func (*ConstantSizedType) IsEquatable() bool
- func (t *ConstantSizedType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *ConstantSizedType) IsImportable(results map[*Member]bool) bool
- func (t *ConstantSizedType) IsInvalidType() bool
- func (t *ConstantSizedType) IsResourceType() bool
- func (t *ConstantSizedType) IsStorable(results map[*Member]bool) bool
- func (*ConstantSizedType) IsType()
- func (t *ConstantSizedType) QualifiedString() string
- func (t *ConstantSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *ConstantSizedType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *ConstantSizedType) String() string
- func (t *ConstantSizedType) Tag() TypeTag
- func (t *ConstantSizedType) TypeAnnotationState() TypeAnnotationState
- func (t *ConstantSizedType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type ContainedType
- type ContainerKind
- type ContainerType
- type ContractValueHandlerFunc
- type ControlStatementError
- type CryptoAlgorithm
- type CyclicImportsError
- type DeclarationKindMismatchError
- type DefaultFunctionConflictError
- type DictionaryEntryType
- type DictionaryExpressionTypes
- type DictionaryType
- func (*DictionaryType) AllowsValueIndexingAssignment() bool
- func (t *DictionaryType) ElementType(_ bool) Type
- func (t *DictionaryType) Equal(other Type) bool
- func (t *DictionaryType) GetMembers() map[string]MemberResolver
- func (t *DictionaryType) ID() TypeID
- func (t *DictionaryType) IndexingType() Type
- func (*DictionaryType) IsEquatable() bool
- func (t *DictionaryType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *DictionaryType) IsImportable(results map[*Member]bool) bool
- func (t *DictionaryType) IsInvalidType() bool
- func (t *DictionaryType) IsResourceType() bool
- func (t *DictionaryType) IsStorable(results map[*Member]bool) bool
- func (*DictionaryType) IsType()
- func (t *DictionaryType) QualifiedString() string
- func (t *DictionaryType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *DictionaryType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *DictionaryType) String() string
- func (t *DictionaryType) Tag() TypeTag
- func (t *DictionaryType) TypeAnnotationState() TypeAnnotationState
- func (t *DictionaryType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type DuplicateConformanceError
- type Elaboration
- type ElaborationImport
- type EmitImportedEventError
- type EmitNonEventError
- type EndPositionGetter
- type EnumInfo
- type ExternalMutationError
- type FieldReinitializationError
- type FieldTypeNotStorableError
- type FieldUninitializedError
- func (e *FieldUninitializedError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
- func (e *FieldUninitializedError) Error() string
- func (*FieldUninitializedError) IsUserError()
- func (e *FieldUninitializedError) SecondaryError() string
- func (e *FieldUninitializedError) StartPosition() ast.Position
- type FixedPointNumericType
- func (t *FixedPointNumericType) AsSuperType() *FixedPointNumericType
- func (t *FixedPointNumericType) Equal(other Type) bool
- func (t *FixedPointNumericType) GetMembers() map[string]MemberResolver
- func (t *FixedPointNumericType) ID() TypeID
- func (*FixedPointNumericType) IsEquatable() bool
- func (*FixedPointNumericType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *FixedPointNumericType) IsImportable(_ map[*Member]bool) bool
- func (*FixedPointNumericType) IsInvalidType() bool
- func (*FixedPointNumericType) IsResourceType() bool
- func (*FixedPointNumericType) IsStorable(_ map[*Member]bool) bool
- func (t *FixedPointNumericType) IsSuperType() bool
- func (*FixedPointNumericType) IsType()
- func (t *FixedPointNumericType) MaxFractional() *big.Int
- func (t *FixedPointNumericType) MaxInt() *big.Int
- func (t *FixedPointNumericType) MinFractional() *big.Int
- func (t *FixedPointNumericType) MinInt() *big.Int
- func (t *FixedPointNumericType) QualifiedString() string
- func (t *FixedPointNumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *FixedPointNumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *FixedPointNumericType) Scale() uint
- func (t *FixedPointNumericType) String() string
- func (t *FixedPointNumericType) SupportsSaturatingAdd() bool
- func (t *FixedPointNumericType) SupportsSaturatingDivide() bool
- func (t *FixedPointNumericType) SupportsSaturatingMultiply() bool
- func (t *FixedPointNumericType) SupportsSaturatingSubtract() bool
- func (t *FixedPointNumericType) Tag() TypeTag
- func (*FixedPointNumericType) TypeAnnotationState() TypeAnnotationState
- func (*FixedPointNumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- func (t *FixedPointNumericType) WithFractionalRange(minFractional *big.Int, maxFractional *big.Int) *FixedPointNumericType
- func (t *FixedPointNumericType) WithIntRange(minInt *big.Int, maxInt *big.Int) *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingAdd() *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingDivide() *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingMultiply() *FixedPointNumericType
- func (t *FixedPointNumericType) WithSaturatingSubtract() *FixedPointNumericType
- func (t *FixedPointNumericType) WithScale(scale uint) *FixedPointNumericType
- func (t *FixedPointNumericType) WithTag(tag TypeTag) *FixedPointNumericType
- type FractionalRangedType
- type FunctionActivation
- type FunctionActivations
- func (a *FunctionActivations) Current() *FunctionActivation
- func (a *FunctionActivations) EnterFunction(functionType *FunctionType, valueActivationDepth int) *FunctionActivation
- func (a *FunctionActivations) IsLocal() bool
- func (a *FunctionActivations) LeaveFunction()
- func (a *FunctionActivations) WithFunction(functionType *FunctionType, valueActivationDepth int, ...)
- type FunctionExpressionInConditionError
- type FunctionInvocation
- type FunctionInvocations
- type FunctionPurity
- type FunctionType
- func AccountForEachFunctionType(pathType Type) *FunctionType
- func ArrayAppendAllFunctionType(arrayType Type) *FunctionType
- func ArrayAppendFunctionType(elementType Type) *FunctionType
- func ArrayConcatFunctionType(arrayType Type) *FunctionType
- func ArrayContainsFunctionType(elementType Type) *FunctionType
- func ArrayFirstIndexFunctionType(elementType Type) *FunctionType
- func ArrayInsertFunctionType(elementType Type) *FunctionType
- func ArrayRemoveFirstFunctionType(elementType Type) *FunctionType
- func ArrayRemoveFunctionType(elementType Type) *FunctionType
- func ArrayRemoveLastFunctionType(elementType Type) *FunctionType
- func ArraySliceFunctionType(elementType Type) *FunctionType
- func CapabilityTypeBorrowFunctionType(borrowType Type) *FunctionType
- func CapabilityTypeCheckFunctionType(borrowType Type) *FunctionType
- func CompositeConstructorType(elaboration *Elaboration, compositeDeclaration *ast.CompositeDeclaration, ...) (constructorFunctionType *FunctionType, argumentLabels []string)
- func DictionaryContainsKeyFunctionType(t *DictionaryType) *FunctionType
- func DictionaryForEachKeyFunctionType(t *DictionaryType) *FunctionType
- func DictionaryInsertFunctionType(t *DictionaryType) *FunctionType
- func DictionaryRemoveFunctionType(t *DictionaryType) *FunctionType
- func EnumConstructorType(compositeType *CompositeType) *FunctionType
- func FromStringFunctionType(ty Type) *FunctionType
- func NumberConversionFunctionType(numberType Type) *FunctionType
- func OptionalTypeMapFunctionType(typ Type) *FunctionType
- func (t *FunctionType) ArgumentLabels() (argumentLabels []string)
- func (t *FunctionType) CheckArgumentExpressions(checker *Checker, argumentExpressions []ast.Expression, ...)
- func (t *FunctionType) Equal(other Type) bool
- func (t *FunctionType) GetMembers() map[string]MemberResolver
- func (t *FunctionType) HasSameArgumentLabels(other *FunctionType) bool
- func (t *FunctionType) ID() TypeID
- func (*FunctionType) IsEquatable() bool
- func (t *FunctionType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *FunctionType) IsImportable(_ map[*Member]bool) bool
- func (t *FunctionType) IsInvalidType() bool
- func (*FunctionType) IsResourceType() bool
- func (t *FunctionType) IsStorable(_ map[*Member]bool) bool
- func (*FunctionType) IsType()
- func (t *FunctionType) QualifiedString() string
- func (t *FunctionType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *FunctionType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *FunctionType) String() string
- func (t *FunctionType) Tag() TypeTag
- func (t *FunctionType) TypeAnnotationState() TypeAnnotationState
- func (t *FunctionType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) (result bool)
- type GenericType
- func (t *GenericType) Equal(other Type) bool
- func (t *GenericType) GetMembers() map[string]MemberResolver
- func (t *GenericType) ID() TypeID
- func (*GenericType) IsEquatable() bool
- func (*GenericType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *GenericType) IsImportable(_ map[*Member]bool) bool
- func (*GenericType) IsInvalidType() bool
- func (*GenericType) IsResourceType() bool
- func (*GenericType) IsStorable(_ map[*Member]bool) bool
- func (*GenericType) IsType()
- func (t *GenericType) QualifiedString() string
- func (t *GenericType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *GenericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *GenericType) String() string
- func (t *GenericType) Tag() TypeTag
- func (*GenericType) TypeAnnotationState() TypeAnnotationState
- func (t *GenericType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type HashAlgorithm
- type Import
- type ImportElement
- type ImportHandlerFunc
- type ImportedProgramError
- type IncorrectArgumentLabelError
- type IncorrectTransferOperationError
- type IndexExpressionTypes
- type InitializationInfo
- type InitializerMismatch
- type IntegerRangedType
- type InterfaceSet
- type InterfaceType
- func (t *InterfaceType) Equal(other Type) bool
- func (t *InterfaceType) FieldPosition(name string, declaration *ast.InterfaceDeclaration) ast.Position
- func (t *InterfaceType) GetCompositeKind() common.CompositeKind
- func (t *InterfaceType) GetContainerType() Type
- func (t *InterfaceType) GetLocation() common.Location
- func (t *InterfaceType) GetMembers() map[string]MemberResolver
- func (t *InterfaceType) GetNestedTypes() *StringTypeOrderedMap
- func (t *InterfaceType) ID() TypeID
- func (t *InterfaceType) IsContainerType() bool
- func (*InterfaceType) IsEquatable() bool
- func (t *InterfaceType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *InterfaceType) IsImportable(results map[*Member]bool) bool
- func (t *InterfaceType) IsInvalidType() bool
- func (t *InterfaceType) IsResourceType() bool
- func (t *InterfaceType) IsStorable(results map[*Member]bool) bool
- func (*InterfaceType) IsType()
- func (t *InterfaceType) MemberMap() *StringMemberOrderedMap
- func (t *InterfaceType) QualifiedIdentifier() string
- func (t *InterfaceType) QualifiedString() string
- func (t *InterfaceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *InterfaceType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *InterfaceType) SetContainerType(containerType Type)
- func (t *InterfaceType) String() string
- func (t *InterfaceType) Tag() TypeTag
- func (*InterfaceType) TypeAnnotationState() TypeAnnotationState
- func (*InterfaceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type InvalidAccessError
- type InvalidAccessModifierError
- type InvalidAddressLiteralError
- type InvalidAssignmentAccessError
- type InvalidAssignmentTargetError
- type InvalidBinaryOperandError
- type InvalidBinaryOperandsError
- type InvalidCharacterLiteralError
- type InvalidConditionalResourceOperandError
- type InvalidConformanceError
- type InvalidConstantSizedTypeBaseError
- type InvalidConstantSizedTypeSizeError
- type InvalidConstructionError
- type InvalidDeclarationError
- type InvalidDestructionError
- type InvalidDestructorError
- type InvalidDestructorParametersError
- type InvalidDictionaryKeyTypeError
- type InvalidEntryPointTypeError
- type InvalidEnumCaseError
- type InvalidEnumConformancesError
- type InvalidEnumRawTypeError
- type InvalidEventParameterTypeError
- type InvalidEventUsageError
- type InvalidFailableResourceDowncastOutsideOptionalBindingError
- type InvalidFixedPointLiteralRangeError
- type InvalidFixedPointLiteralScaleError
- type InvalidImplementationError
- type InvalidIndexingError
- type InvalidIntegerLiteralRangeError
- type InvalidInterfaceDeclarationError
- type InvalidInterfaceTypeError
- type InvalidMoveError
- type InvalidMoveOperationError
- type InvalidNameError
- type InvalidNestedDeclarationError
- type InvalidNestedResourceMoveError
- type InvalidNestedTypeError
- type InvalidNilCoalescingRightResourceOperandError
- type InvalidNonConformanceRestrictionError
- type InvalidNonEnumCaseError
- type InvalidNonIdentifierFailableResourceDowncast
- type InvalidNonImportableTransactionParameterTypeError
- type InvalidOptionalChainingError
- type InvalidPathDomainError
- type InvalidPathIdentifierError
- type InvalidPragmaError
- type InvalidResourceAnnotationError
- type InvalidResourceArrayMemberError
- type InvalidResourceAssignmentError
- type InvalidResourceCreationError
- type InvalidResourceDictionaryMemberError
- type InvalidResourceFieldError
- type InvalidResourceOptionalMemberError
- type InvalidResourceTransactionParameterError
- type InvalidRestrictedTypeError
- type InvalidRestrictedTypeMemberAccessError
- type InvalidRestrictionTypeDuplicateError
- type InvalidRestrictionTypeError
- type InvalidSelfInvalidationError
- type InvalidSwapExpressionError
- type InvalidTopLevelDeclarationError
- type InvalidTransactionBlockError
- func (e *InvalidTransactionBlockError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
- func (e *InvalidTransactionBlockError) Error() string
- func (*InvalidTransactionBlockError) IsUserError()
- func (e *InvalidTransactionBlockError) SecondaryError() string
- func (e *InvalidTransactionBlockError) StartPosition() ast.Position
- type InvalidTransactionFieldAccessModifierError
- func (e *InvalidTransactionFieldAccessModifierError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
- func (e *InvalidTransactionFieldAccessModifierError) Error() string
- func (*InvalidTransactionFieldAccessModifierError) IsUserError()
- func (e *InvalidTransactionFieldAccessModifierError) StartPosition() ast.Position
- type InvalidTransactionPrepareParameterTypeError
- type InvalidTypeArgumentCountError
- type InvalidUnaryOperandError
- type InvalidVariableKindError
- type InvalidatedResourceReferenceError
- type InvocationExpressionTypes
- type LocatedType
- type LocationHandlerFunc
- type Member
- func NewPublicConstantFieldMember(memoryGauge common.MemoryGauge, containerType Type, identifier string, ...) *Member
- func NewPublicFunctionMember(memoryGauge common.MemoryGauge, containerType Type, identifier string, ...) *Member
- func NewUnmeteredPublicConstantFieldMember(containerType Type, identifier string, fieldType Type, docString string) *Member
- func NewUnmeteredPublicFunctionMember(containerType Type, identifier string, functionType *FunctionType, ...) *Member
- type MemberAccess
- type MemberAccesses
- type MemberAccountAccessHandlerFunc
- type MemberFieldDeclarationOrderedMap
- type MemberInfo
- type MemberMismatch
- type MemberMismatchNote
- type MemberResolver
- type MissingAccessModifierError
- type MissingArgumentLabelError
- type MissingConformanceError
- type MissingCreateError
- type MissingDestructorError
- type MissingEntryPointError
- type MissingEnumRawTypeError
- type MissingFunctionBodyError
- type MissingInitializerError
- type MissingMoveOperationError
- type MissingResourceAnnotationError
- type MissingReturnStatementError
- type MissingReturnValueError
- type MissingSwitchCaseStatementsError
- type MultipleInterfaceDefaultImplementationsError
- func (e *MultipleInterfaceDefaultImplementationsError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
- func (e *MultipleInterfaceDefaultImplementationsError) Error() string
- func (*MultipleInterfaceDefaultImplementationsError) IsUserError()
- func (e *MultipleInterfaceDefaultImplementationsError) StartPosition() ast.Position
- type NominalType
- type NonReferenceTypeReferenceError
- type NonResourceTypeError
- type NotCallableError
- type NotDeclaredError
- type NotDeclaredMemberError
- type NotEquatableTypeError
- type NotExportedError
- type NotIndexableTypeError
- type NotIndexingAssignableTypeError
- type NumericType
- func (t *NumericType) AsSuperType() *NumericType
- func (t *NumericType) Equal(other Type) bool
- func (t *NumericType) GetMembers() map[string]MemberResolver
- func (t *NumericType) ID() TypeID
- func (*NumericType) IsEquatable() bool
- func (*NumericType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *NumericType) IsImportable(_ map[*Member]bool) bool
- func (*NumericType) IsInvalidType() bool
- func (*NumericType) IsResourceType() bool
- func (*NumericType) IsStorable(_ map[*Member]bool) bool
- func (t *NumericType) IsSuperType() bool
- func (*NumericType) IsType()
- func (t *NumericType) MaxInt() *big.Int
- func (t *NumericType) MinInt() *big.Int
- func (t *NumericType) QualifiedString() string
- func (t *NumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *NumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
- func (t *NumericType) String() string
- func (t *NumericType) SupportsSaturatingAdd() bool
- func (t *NumericType) SupportsSaturatingDivide() bool
- func (t *NumericType) SupportsSaturatingMultiply() bool
- func (t *NumericType) SupportsSaturatingSubtract() bool
- func (t *NumericType) Tag() TypeTag
- func (*NumericType) TypeAnnotationState() TypeAnnotationState
- func (*NumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- func (t *NumericType) WithIntRange(min *big.Int, max *big.Int) *NumericType
- func (t *NumericType) WithSaturatingAdd() *NumericType
- func (t *NumericType) WithSaturatingDivide() *NumericType
- func (t *NumericType) WithSaturatingMultiply() *NumericType
- func (t *NumericType) WithSaturatingSubtract() *NumericType
- func (t *NumericType) WithTag(tag TypeTag) *NumericType
- type Occurrence
- type Occurrences
- type OptionalType
- func (t *OptionalType) Equal(other Type) bool
- func (t *OptionalType) GetMembers() map[string]MemberResolver
- func (t *OptionalType) ID() TypeID
- func (t *OptionalType) IsEquatable() bool
- func (t *OptionalType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *OptionalType) IsImportable(results map[*Member]bool) bool
- func (t *OptionalType) IsInvalidType() bool
- func (t *OptionalType) IsResourceType() bool
- func (t *OptionalType) IsStorable(results map[*Member]bool) bool
- func (*OptionalType) IsType()
- func (t *OptionalType) QualifiedString() string
- func (t *OptionalType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *OptionalType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *OptionalType) String() string
- func (t *OptionalType) Tag() TypeTag
- func (t *OptionalType) TypeAnnotationState() TypeAnnotationState
- func (t *OptionalType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type Origin
- type Parameter
- type ParameterizedType
- type Position
- type PositionInfo
- type PostConditionsRewrite
- type PreviousResourceInvalidationNote
- type PurityCheckScope
- type PurityError
- type Range
- type Ranges
- type ReadOnlyTargetAssignmentError
- type RedeclarationError
- type RedeclarationNote
- type ReferenceType
- func (t *ReferenceType) AllowsValueIndexingAssignment() bool
- func (t *ReferenceType) ElementType(isAssignment bool) Type
- func (t *ReferenceType) Equal(other Type) bool
- func (t *ReferenceType) GetMembers() map[string]MemberResolver
- func (t *ReferenceType) ID() TypeID
- func (t *ReferenceType) IndexingType() Type
- func (*ReferenceType) IsEquatable() bool
- func (t *ReferenceType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *ReferenceType) IsImportable(_ map[*Member]bool) bool
- func (t *ReferenceType) IsInvalidType() bool
- func (t *ReferenceType) IsResourceType() bool
- func (t *ReferenceType) IsStorable(_ map[*Member]bool) bool
- func (*ReferenceType) IsType()
- func (t *ReferenceType) QualifiedString() string
- func (t *ReferenceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *ReferenceType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *ReferenceType) String() string
- func (t *ReferenceType) Tag() TypeTag
- func (*ReferenceType) TypeAnnotationState() TypeAnnotationState
- func (*ReferenceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type ResolvedLocation
- type Resource
- type ResourceCapturingError
- type ResourceFieldNotInvalidatedError
- func (e *ResourceFieldNotInvalidatedError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
- func (e *ResourceFieldNotInvalidatedError) Error() string
- func (*ResourceFieldNotInvalidatedError) IsUserError()
- func (e *ResourceFieldNotInvalidatedError) SecondaryError() string
- func (e *ResourceFieldNotInvalidatedError) StartPosition() ast.Position
- type ResourceInfo
- func (ris *ResourceInfo) Clone() ResourceInfo
- func (ris ResourceInfo) DefinitivelyInvalidated() bool
- func (ris *ResourceInfo) DeleteLocally(invalidation ResourceInvalidation)
- func (ris ResourceInfo) Invalidation() *ResourceInvalidation
- func (ris *ResourceInfo) MaybeRecordInvalidation(invalidation ResourceInvalidation) ResourceInvalidation
- type ResourceInvalidation
- type ResourceInvalidationKind
- func (k ResourceInvalidationKind) AsPotential() ResourceInvalidationKind
- func (i ResourceInvalidationKind) CoarseNoun() string
- func (k ResourceInvalidationKind) CoarsePassiveVerb() string
- func (k ResourceInvalidationKind) DetailedNoun() string
- func (k ResourceInvalidationKind) IsDefinite() bool
- func (i ResourceInvalidationKind) String() string
- type ResourceLossError
- type ResourceMethodBindingError
- type ResourceUseAfterInvalidationError
- type Resources
- func (ris *Resources) Clone() *Resources
- func (ris *Resources) ForEach(f func(resource Resource, info ResourceInfo))
- func (ris *Resources) Get(resource Resource) ResourceInfo
- func (ris *Resources) MaybeRecordInvalidation(resource Resource, invalidation ResourceInvalidation)
- func (ris *Resources) MergeBranches(thenResources *Resources, thenReturnInfo *ReturnInfo, elseResources *Resources, ...)
- func (ris *Resources) Reclaim()
- func (ris *Resources) RemoveTemporaryMoveInvalidation(resource Resource, invalidation ResourceInvalidation)
- func (ris *Resources) Size() int
- func (ris *Resources) String() string
- type RestrictedType
- func (t *RestrictedType) Equal(other Type) bool
- func (t *RestrictedType) GetMembers() map[string]MemberResolver
- func (t *RestrictedType) ID() TypeID
- func (*RestrictedType) IsEquatable() bool
- func (t *RestrictedType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *RestrictedType) IsImportable(results map[*Member]bool) bool
- func (t *RestrictedType) IsInvalidType() bool
- func (t *RestrictedType) IsResourceType() bool
- func (t *RestrictedType) IsStorable(results map[*Member]bool) bool
- func (*RestrictedType) IsType()
- func (t *RestrictedType) QualifiedString() string
- func (t *RestrictedType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *RestrictedType) RestrictionSet() *InterfaceSet
- func (t *RestrictedType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *RestrictedType) String() string
- func (t *RestrictedType) Tag() TypeTag
- func (*RestrictedType) TypeAnnotationState() TypeAnnotationState
- func (*RestrictedType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type RestrictionCompositeKindMismatchError
- type RestrictionMemberClashError
- type ReturnInfo
- func (ri *ReturnInfo) AddJumpOffset(offset int)
- func (ri *ReturnInfo) Clone() *ReturnInfo
- func (ri *ReturnInfo) IsUnreachable() bool
- func (ri *ReturnInfo) MaybeJumped() bool
- func (ri *ReturnInfo) MergeBranches(thenReturnInfo *ReturnInfo, elseReturnInfo *ReturnInfo)
- func (ri *ReturnInfo) MergePotentiallyUnevaluated(temporaryReturnInfo *ReturnInfo)
- func (ri *ReturnInfo) WithNewJumpTarget(f func())
- type ReturnStatementTypes
- type RuntimeCastTypes
- type RuntimeTypeConstructor
- type SaturatingArithmeticType
- type SemanticError
- type SignatureAlgorithm
- type SimpleType
- func (t *SimpleType) AllowsValueIndexingAssignment() bool
- func (t *SimpleType) ElementType(isAssignment bool) Type
- func (t *SimpleType) Equal(other Type) bool
- func (t *SimpleType) GetMembers() map[string]MemberResolver
- func (t *SimpleType) GetNestedTypes() *StringTypeOrderedMap
- func (t *SimpleType) ID() TypeID
- func (t *SimpleType) IndexingType() Type
- func (t *SimpleType) IsContainerType() bool
- func (t *SimpleType) IsEquatable() bool
- func (t *SimpleType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *SimpleType) IsImportable(_ map[*Member]bool) bool
- func (t *SimpleType) IsInvalidType() bool
- func (t *SimpleType) IsResourceType() bool
- func (t *SimpleType) IsStorable(_ map[*Member]bool) bool
- func (*SimpleType) IsType()
- func (t *SimpleType) QualifiedString() string
- func (t *SimpleType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *SimpleType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *SimpleType) String() string
- func (t *SimpleType) Tag() TypeTag
- func (*SimpleType) TypeAnnotationState() TypeAnnotationState
- func (*SimpleType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type SpecialFunctionDefaultImplementationError
- func (e *SpecialFunctionDefaultImplementationError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
- func (e *SpecialFunctionDefaultImplementationError) Error() string
- func (*SpecialFunctionDefaultImplementationError) IsUserError()
- func (e *SpecialFunctionDefaultImplementationError) StartPosition() ast.Position
- type StringImportElementOrderedMap
- type StringMemberOrderedMap
- type StringTypeOrderedMap
- type StringVariableOrderedMap
- type SwapStatementTypes
- type SwitchDefaultPositionError
- type TransactionMissingPrepareError
- type TransactionType
- func (t *TransactionType) EntryPointFunctionType() *FunctionType
- func (*TransactionType) Equal(other Type) bool
- func (*TransactionType) ExecuteFunctionType() *FunctionType
- func (t *TransactionType) GetMembers() map[string]MemberResolver
- func (*TransactionType) ID() TypeID
- func (*TransactionType) IsEquatable() bool
- func (*TransactionType) IsExternallyReturnable(_ map[*Member]bool) bool
- func (t *TransactionType) IsImportable(_ map[*Member]bool) bool
- func (*TransactionType) IsInvalidType() bool
- func (*TransactionType) IsResourceType() bool
- func (*TransactionType) IsStorable(_ map[*Member]bool) bool
- func (*TransactionType) IsType()
- func (t *TransactionType) PrepareFunctionType() *FunctionType
- func (*TransactionType) QualifiedString() string
- func (t *TransactionType) Resolve(_ *TypeParameterTypeOrderedMap) Type
- func (t *TransactionType) RewriteWithRestrictedTypes() (Type, bool)
- func (*TransactionType) String() string
- func (t *TransactionType) Tag() TypeTag
- func (*TransactionType) TypeAnnotationState() TypeAnnotationState
- func (*TransactionType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
- type Type
- type TypeAnnotation
- type TypeAnnotationRequiredError
- type TypeAnnotationState
- type TypeCheckFunc
- type TypeDeclaration
- type TypeID
- type TypeMismatchError
- type TypeMismatchWithDescriptionError
- type TypeParameter
- type TypeParameterTypeInferenceError
- type TypeParameterTypeMismatchError
- type TypeParameterTypeOrderedMap
- type TypeTag
- type UninitializedFieldAccessError
- type UninitializedUseError
- type UnknownSpecialFunctionError
- type UnparameterizedTypeInstantiationError
- type UnreachableStatementError
- type UnresolvedImportError
- type UnsupportedOptionalChainingAssignmentError
- type UnsupportedOverloadingError
- type UnsupportedResourceForLoopError
- type ValidTopLevelDeclarationsHandlerFunc
- type ValueDeclaration
- type ValueIndexableType
- type ValueIndexingInfo
- type Variable
- type VariableActivation
- func (a *VariableActivation) Clear()
- func (a *VariableActivation) DeclareType(declaration TypeDeclaration)
- func (a *VariableActivation) DeclareValue(declaration ValueDeclaration)
- func (a *VariableActivation) Find(name string) *Variable
- func (a *VariableActivation) ForEach(cb func(string, *Variable) error) error
- func (a *VariableActivation) Set(name string, variable *Variable)
- func (a *VariableActivation) SetParent(parent *VariableActivation)
- type VariableActivations
- func (a *VariableActivations) Current() *VariableActivation
- func (a *VariableActivations) DeclareValue(declaration ValueDeclaration) (*Variable, error)
- func (a *VariableActivations) Depth() int
- func (a *VariableActivations) Enter()
- func (a *VariableActivations) Find(name string) *Variable
- func (a *VariableActivations) ForEachVariableDeclaredInAndBelow(depth int, f func(name string, value *Variable))
- func (a *VariableActivations) Leave(getEndPosition func(common.MemoryGauge) ast.Position)
- func (a *VariableActivations) Set(name string, variable *Variable)
- type VariableDeclarationTypes
- type VariableSizedType
- func (*VariableSizedType) AllowsValueIndexingAssignment() bool
- func (t *VariableSizedType) ElementType(_ bool) Type
- func (t *VariableSizedType) Equal(other Type) bool
- func (t *VariableSizedType) GetMembers() map[string]MemberResolver
- func (t *VariableSizedType) ID() TypeID
- func (t *VariableSizedType) IndexingType() Type
- func (*VariableSizedType) IsEquatable() bool
- func (t *VariableSizedType) IsExternallyReturnable(results map[*Member]bool) bool
- func (t *VariableSizedType) IsImportable(results map[*Member]bool) bool
- func (t *VariableSizedType) IsInvalidType() bool
- func (t *VariableSizedType) IsResourceType() bool
- func (t *VariableSizedType) IsStorable(results map[*Member]bool) bool
- func (*VariableSizedType) IsType()
- func (t *VariableSizedType) QualifiedString() string
- func (t *VariableSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
- func (t *VariableSizedType) RewriteWithRestrictedTypes() (Type, bool)
- func (t *VariableSizedType) String() string
- func (t *VariableSizedType) Tag() TypeTag
- func (t *VariableSizedType) TypeAnnotationState() TypeAnnotationState
- func (t *VariableSizedType) Unify(other Type, typeParameters *TypeParameterTypeOrderedMap, ...) bool
- type VirtualImport
Constants ¶
const ( Int8TypeSize uint = 1 UInt8TypeSize uint = 1 Word8TypeSize uint = 1 Int16TypeSize uint = 2 UInt16TypeSize uint = 2 Word16TypeSize uint = 2 Int32TypeSize uint = 4 UInt32TypeSize uint = 4 Word32TypeSize uint = 4 Int64TypeSize uint = 8 UInt64TypeSize uint = 8 Word64TypeSize uint = 8 Fix64TypeSize uint = 8 UFix64TypeSize uint = 8 Int128TypeSize uint = 16 UInt128TypeSize uint = 16 Int256TypeSize uint = 32 UInt256TypeSize uint = 32 )
size constants (in bytes) for fixed-width numeric types
const ( FunctionPurityImpure = iota FunctionPurityView )
const ( NumberTypeName = "Number" SignedNumberTypeName = "SignedNumber" IntegerTypeName = "Integer" SignedIntegerTypeName = "SignedInteger" FixedPointTypeName = "FixedPoint" SignedFixedPointTypeName = "SignedFixedPoint" IntTypeName = "Int" Int8TypeName = "Int8" Int16TypeName = "Int16" Int32TypeName = "Int32" Int64TypeName = "Int64" Int128TypeName = "Int128" Int256TypeName = "Int256" UIntTypeName = "UInt" UInt8TypeName = "UInt8" UInt16TypeName = "UInt16" UInt32TypeName = "UInt32" UInt64TypeName = "UInt64" UInt128TypeName = "UInt128" UInt256TypeName = "UInt256" Word8TypeName = "Word8" Word16TypeName = "Word16" Word32TypeName = "Word32" Word64TypeName = "Word64" Fix64TypeName = "Fix64" UFix64TypeName = "UFix64" )
const AccountKeyHashAlgoField = "hashAlgorithm"
const AccountKeyIsRevokedField = "isRevoked"
const AccountKeyKeyIndexField = "keyIndex"
const AccountKeyPublicKeyField = "publicKey"
const AccountKeyTypeName = "AccountKey"
const AccountKeyWeightField = "weight"
const AccountKeysAddFunctionName = "add"
const AccountKeysCountFieldName = "count"
const AccountKeysGetFunctionName = "get"
const AccountKeysRevokeFunctionName = "revoke"
const AccountKeysTypeForEachFunctionName = "forEach"
const AccountKeysTypeName = "Keys"
const AddressTypeName = "Address"
const AddressTypeToBytesFunctionName = `toBytes`
const ArgumentLabelNotRequired = "_"
const AuthAccountAddressField = "address"
const AuthAccountAvailableBalanceField = "availableBalance"
const AuthAccountBalanceField = "balance"
const AuthAccountBorrowField = "borrow"
const AuthAccountContractsField = "contracts"
const AuthAccountContractsTypeAddFunctionName = "add"
const AuthAccountContractsTypeGetFunctionName = "get"
const AuthAccountContractsTypeName = "Contracts"
const AuthAccountContractsTypeNamesField = "names"
const AuthAccountContractsTypeRemoveFunctionName = "remove"
const AuthAccountContractsTypeUpdateExperimentalFunctionName = "update__experimental"
const AuthAccountCopyField = "copy"
const AuthAccountForEachPrivateField = "forEachPrivate"
const AuthAccountForEachPublicField = "forEachPublic"
const AuthAccountForEachStoredField = "forEachStored"
const AuthAccountGetCapabilityField = "getCapability"
const AuthAccountGetLinkTargetField = "getLinkTarget"
const AuthAccountInboxClaimField = "claim"
const AuthAccountInboxField = "inbox"
const AuthAccountInboxPublishField = "publish"
const AuthAccountInboxUnpublishField = "unpublish"
const AuthAccountKeysField = "keys"
const AuthAccountLinkField = "link"
const AuthAccountLoadField = "load"
const AuthAccountPrivatePathsField = "privatePaths"
const AuthAccountPublicPathsField = "publicPaths"
const AuthAccountSaveField = "save"
const AuthAccountStorageCapacityField = "storageCapacity"
const AuthAccountStoragePathsField = "storagePaths"
const AuthAccountStorageUsedField = "storageUsed"
const AuthAccountTypeField = "type"
const AuthAccountTypeName = "AuthAccount"
const AuthAccountUnlinkField = "unlink"
const BeforeIdentifier = "before"
const BlockIDSize = 32
const BlockTypeHeightFieldName = "height"
const BlockTypeIDFieldName = "id"
const BlockTypeTimestampFieldName = "timestamp"
const BlockTypeViewFieldName = "view"
const CapabilityTypeAddressField = "address"
const CapabilityTypeBorrowField = "borrow"
const CapabilityTypeCheckField = "check"
const DeployedContractTypeAddressFieldName = "address"
const DeployedContractTypeCodeFieldName = "code"
const DeployedContractTypeNameFieldName = "name"
const EnumRawValueFieldName = "rawValue"
const Fix64Factor = fixedpoint.Fix64Factor
const Fix64Scale = fixedpoint.Fix64Scale
const Fix64TypeMaxFractional = fixedpoint.Fix64TypeMaxFractional
const Fix64TypeMaxInt = fixedpoint.Fix64TypeMaxInt
const Fix64TypeMinFractional = fixedpoint.Fix64TypeMinFractional
const Fix64TypeMinInt = fixedpoint.Fix64TypeMinInt
const FromStringFunctionName = "fromString"
fromString
const FunctionEntryPointName = "main"
const GetTypeFunctionName = "getType"
const HashAlgorithmDocStringKECCAK_256 = `` /* 187-byte string literal not displayed */
const HashAlgorithmDocStringKMAC128_BLS_BLS12_381 = `` /* 546-byte string literal not displayed */
const HashAlgorithmDocStringSHA2_256 = `
SHA2_256 is SHA-2 with a 256-bit digest (also referred to as SHA256)
`
const HashAlgorithmDocStringSHA2_384 = `
SHA2_384 is SHA-2 with a 384-bit digest (also referred to as SHA384)
`
const HashAlgorithmDocStringSHA3_256 = `
SHA3_256 is SHA-3 with a 256-bit digest
`
const HashAlgorithmDocStringSHA3_384 = `
SHA3_384 is SHA-3 with a 384-bit digest
`
const HashAlgorithmTypeHashFunctionDocString = `
Returns the hash of the given data
`
const HashAlgorithmTypeHashFunctionName = "hash"
const HashAlgorithmTypeHashWithTagFunctionDocString = `
Returns the hash of the given data and tag
`
const HashAlgorithmTypeHashWithTagFunctionName = "hashWithTag"
const HashAlgorithmTypeName = "HashAlgorithm"
const IsInstanceFunctionName = "isInstance"
const MetaTypeName = "Type"
const NumberTypeMaxFieldName = "max"
const NumberTypeMinFieldName = "min"
const NumericTypeSaturatingAddFunctionName = "saturatingAdd"
const NumericTypeSaturatingDivideFunctionName = "saturatingDivide"
const NumericTypeSaturatingMultiplyFunctionName = "saturatingMultiply"
const NumericTypeSaturatingSubtractFunctionName = "saturatingSubtract"
const PublicAccountAddressField = "address"
const PublicAccountAvailableBalanceField = "availableBalance"
const PublicAccountBalanceField = "balance"
const PublicAccountContractsField = "contracts"
const PublicAccountContractsTypeGetFunctionName = "get"
const PublicAccountContractsTypeName = "Contracts"
const PublicAccountContractsTypeNamesField = "names"
const PublicAccountForEachPublicField = "forEachPublic"
const PublicAccountGetCapabilityField = "getCapability"
const PublicAccountGetTargetLinkField = "getLinkTarget"
const PublicAccountKeysField = "keys"
const PublicAccountPathsField = "publicPaths"
const PublicAccountStorageCapacityField = "storageCapacity"
const PublicAccountStorageUsedField = "storageUsed"
const PublicAccountTypeName = "PublicAccount"
const PublicKeyPublicKeyField = "publicKey"
const PublicKeySignAlgoField = "signatureAlgorithm"
const PublicKeyTypeName = "PublicKey"
const PublicKeyVerifyFunction = "verify"
const PublicKeyVerifyPoPFunction = "verifyPoP"
const ResourceOwnerFieldName = "owner"
const ResourceUUIDFieldName = "uuid"
const ResultIdentifier = "result"
const SelfIdentifier = "self"
const SignatureAlgorithmDocStringBLS_BLS12_381 = `` /* 244-byte string literal not displayed */
const SignatureAlgorithmDocStringECDSA_P256 = `
ECDSA_P256 is ECDSA on the NIST P-256 curve
`
const SignatureAlgorithmDocStringECDSA_secp256k1 = `
ECDSA_secp256k1 is ECDSA on the secp256k1 curve
`
const SignatureAlgorithmTypeName = "SignatureAlgorithm"
const StringTypeEncodeHexFunctionDocString = `
Returns a hexadecimal string for the given byte array
`
const StringTypeEncodeHexFunctionName = "encodeHex"
const StringTypeFromCharactersFunctionDocString = `
Returns a string from the given array of characters
`
const StringTypeFromCharactersFunctionName = "fromCharacters"
const StringTypeFromUtf8FunctionDocString = `
Attempt to decode the input as a UTF-8 encoded string. Returns nil if the input bytes are malformed UTF-8
`
const StringTypeFromUtf8FunctionName = "fromUTF8"
const ToBigEndianBytesFunctionName = "toBigEndianBytes"
const ToStringFunctionName = "toString"
const UFix64TypeMaxFractional = fixedpoint.UFix64TypeMaxFractional
const UFix64TypeMaxInt = fixedpoint.UFix64TypeMaxInt
const UFix64TypeMinFractional = fixedpoint.UFix64TypeMinFractional
const UFix64TypeMinInt = fixedpoint.UFix64TypeMinInt
Variables ¶
var ( // NumberType represents the super-type of all number types NumberType = NewNumericType(NumberTypeName). WithTag(NumberTypeTag). AsSuperType() // SignedNumberType represents the super-type of all signed number types SignedNumberType = NewNumericType(SignedNumberTypeName). WithTag(SignedNumberTypeTag). AsSuperType() // IntegerType represents the super-type of all integer types IntegerType = NewNumericType(IntegerTypeName). WithTag(IntegerTypeTag). AsSuperType() // SignedIntegerType represents the super-type of all signed integer types SignedIntegerType = NewNumericType(SignedIntegerTypeName). WithTag(SignedIntegerTypeTag). AsSuperType() // IntType represents the arbitrary-precision integer type `Int` IntType = NewNumericType(IntTypeName). WithTag(IntTypeTag) // Int8Type represents the 8-bit signed integer type `Int8` Int8Type = NewNumericType(Int8TypeName). WithTag(Int8TypeTag). WithIntRange(Int8TypeMinInt, Int8TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int16Type represents the 16-bit signed integer type `Int16` Int16Type = NewNumericType(Int16TypeName). WithTag(Int16TypeTag). WithIntRange(Int16TypeMinInt, Int16TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int32Type represents the 32-bit signed integer type `Int32` Int32Type = NewNumericType(Int32TypeName). WithTag(Int32TypeTag). WithIntRange(Int32TypeMinInt, Int32TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int64Type represents the 64-bit signed integer type `Int64` Int64Type = NewNumericType(Int64TypeName). WithTag(Int64TypeTag). WithIntRange(Int64TypeMinInt, Int64TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int128Type represents the 128-bit signed integer type `Int128` Int128Type = NewNumericType(Int128TypeName). WithTag(Int128TypeTag). WithIntRange(Int128TypeMinIntBig, Int128TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // Int256Type represents the 256-bit signed integer type `Int256` Int256Type = NewNumericType(Int256TypeName). WithTag(Int256TypeTag). WithIntRange(Int256TypeMinIntBig, Int256TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // UIntType represents the arbitrary-precision unsigned integer type `UInt` UIntType = NewNumericType(UIntTypeName). WithTag(UIntTypeTag). WithIntRange(UIntTypeMin, nil). WithSaturatingSubtract() // UInt8Type represents the 8-bit unsigned integer type `UInt8` // which checks for overflow and underflow UInt8Type = NewNumericType(UInt8TypeName). WithTag(UInt8TypeTag). WithIntRange(UInt8TypeMinInt, UInt8TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt16Type represents the 16-bit unsigned integer type `UInt16` // which checks for overflow and underflow UInt16Type = NewNumericType(UInt16TypeName). WithTag(UInt16TypeTag). WithIntRange(UInt16TypeMinInt, UInt16TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt32Type represents the 32-bit unsigned integer type `UInt32` // which checks for overflow and underflow UInt32Type = NewNumericType(UInt32TypeName). WithTag(UInt32TypeTag). WithIntRange(UInt32TypeMinInt, UInt32TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt64Type represents the 64-bit unsigned integer type `UInt64` // which checks for overflow and underflow UInt64Type = NewNumericType(UInt64TypeName). WithTag(UInt64TypeTag). WithIntRange(UInt64TypeMinInt, UInt64TypeMaxInt). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt128Type represents the 128-bit unsigned integer type `UInt128` // which checks for overflow and underflow UInt128Type = NewNumericType(UInt128TypeName). WithTag(UInt128TypeTag). WithIntRange(UInt128TypeMinIntBig, UInt128TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // UInt256Type represents the 256-bit unsigned integer type `UInt256` // which checks for overflow and underflow UInt256Type = NewNumericType(UInt256TypeName). WithTag(UInt256TypeTag). WithIntRange(UInt256TypeMinIntBig, UInt256TypeMaxIntBig). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() // Word8Type represents the 8-bit unsigned integer type `Word8` // which does NOT check for overflow and underflow Word8Type = NewNumericType(Word8TypeName). WithTag(Word8TypeTag). WithIntRange(Word8TypeMinInt, Word8TypeMaxInt) // Word16Type represents the 16-bit unsigned integer type `Word16` // which does NOT check for overflow and underflow Word16Type = NewNumericType(Word16TypeName). WithTag(Word16TypeTag). WithIntRange(Word16TypeMinInt, Word16TypeMaxInt) // Word32Type represents the 32-bit unsigned integer type `Word32` // which does NOT check for overflow and underflow Word32Type = NewNumericType(Word32TypeName). WithTag(Word32TypeTag). WithIntRange(Word32TypeMinInt, Word32TypeMaxInt) // Word64Type represents the 64-bit unsigned integer type `Word64` // which does NOT check for overflow and underflow Word64Type = NewNumericType(Word64TypeName). WithTag(Word64TypeTag). WithIntRange(Word64TypeMinInt, Word64TypeMaxInt) // FixedPointType represents the super-type of all fixed-point types FixedPointType = NewNumericType(FixedPointTypeName). WithTag(FixedPointTypeTag). AsSuperType() // SignedFixedPointType represents the super-type of all signed fixed-point types SignedFixedPointType = NewNumericType(SignedFixedPointTypeName). WithTag(SignedFixedPointTypeTag). AsSuperType() // Fix64Type represents the 64-bit signed decimal fixed-point type `Fix64` // which has a scale of Fix64Scale, and checks for overflow and underflow Fix64Type = NewFixedPointNumericType(Fix64TypeName). WithTag(Fix64TypeTag). WithIntRange(Fix64TypeMinIntBig, Fix64TypeMaxIntBig). WithFractionalRange(Fix64TypeMinFractionalBig, Fix64TypeMaxFractionalBig). WithScale(Fix64Scale). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply(). WithSaturatingDivide() // UFix64Type represents the 64-bit unsigned decimal fixed-point type `UFix64` // which has a scale of 1E9, and checks for overflow and underflow UFix64Type = NewFixedPointNumericType(UFix64TypeName). WithTag(UFix64TypeTag). WithIntRange(UFix64TypeMinIntBig, UFix64TypeMaxIntBig). WithFractionalRange(UFix64TypeMinFractionalBig, UFix64TypeMaxFractionalBig). WithScale(Fix64Scale). WithSaturatingAdd(). WithSaturatingSubtract(). WithSaturatingMultiply() )
var ( Int8TypeMinInt = new(big.Int).SetInt64(math.MinInt8) Int8TypeMaxInt = new(big.Int).SetInt64(math.MaxInt8) Int16TypeMinInt = new(big.Int).SetInt64(math.MinInt16) Int16TypeMaxInt = new(big.Int).SetInt64(math.MaxInt16) Int32TypeMinInt = new(big.Int).SetInt64(math.MinInt32) Int32TypeMaxInt = new(big.Int).SetInt64(math.MaxInt32) Int64TypeMinInt = new(big.Int).SetInt64(math.MinInt64) Int64TypeMaxInt = new(big.Int).SetInt64(math.MaxInt64) Int128TypeMinIntBig = func() *big.Int { int128TypeMin := big.NewInt(-1) int128TypeMin.Lsh(int128TypeMin, 127) return int128TypeMin }() Int128TypeMaxIntBig = func() *big.Int { int128TypeMax := big.NewInt(1) int128TypeMax.Lsh(int128TypeMax, 127) int128TypeMax.Sub(int128TypeMax, big.NewInt(1)) return int128TypeMax }() Int256TypeMinIntBig = func() *big.Int { int256TypeMin := big.NewInt(-1) int256TypeMin.Lsh(int256TypeMin, 255) return int256TypeMin }() Int256TypeMaxIntBig = func() *big.Int { int256TypeMax := big.NewInt(1) int256TypeMax.Lsh(int256TypeMax, 255) int256TypeMax.Sub(int256TypeMax, big.NewInt(1)) return int256TypeMax }() UIntTypeMin = new(big.Int) UInt8TypeMinInt = new(big.Int) UInt8TypeMaxInt = new(big.Int).SetUint64(math.MaxUint8) UInt16TypeMinInt = new(big.Int) UInt16TypeMaxInt = new(big.Int).SetUint64(math.MaxUint16) UInt32TypeMinInt = new(big.Int) UInt32TypeMaxInt = new(big.Int).SetUint64(math.MaxUint32) UInt64TypeMinInt = new(big.Int) UInt64TypeMaxInt = new(big.Int).SetUint64(math.MaxUint64) UInt128TypeMinIntBig = new(big.Int) UInt128TypeMaxIntBig = func() *big.Int { uInt128TypeMax := big.NewInt(1) uInt128TypeMax.Lsh(uInt128TypeMax, 128) uInt128TypeMax.Sub(uInt128TypeMax, big.NewInt(1)) return uInt128TypeMax }() UInt256TypeMinIntBig = new(big.Int) UInt256TypeMaxIntBig = func() *big.Int { uInt256TypeMax := big.NewInt(1) uInt256TypeMax.Lsh(uInt256TypeMax, 256) uInt256TypeMax.Sub(uInt256TypeMax, big.NewInt(1)) return uInt256TypeMax }() Word8TypeMinInt = new(big.Int) Word8TypeMaxInt = new(big.Int).SetUint64(math.MaxUint8) Word16TypeMinInt = new(big.Int) Word16TypeMaxInt = new(big.Int).SetUint64(math.MaxUint16) Word32TypeMinInt = new(big.Int) Word32TypeMaxInt = new(big.Int).SetUint64(math.MaxUint32) Word64TypeMinInt = new(big.Int) Word64TypeMaxInt = new(big.Int).SetUint64(math.MaxUint64) Fix64FactorBig = new(big.Int).SetUint64(uint64(Fix64Factor)) Fix64TypeMinIntBig = fixedpoint.Fix64TypeMinIntBig Fix64TypeMaxIntBig = fixedpoint.Fix64TypeMaxIntBig Fix64TypeMinFractionalBig = fixedpoint.Fix64TypeMinFractionalBig Fix64TypeMaxFractionalBig = fixedpoint.Fix64TypeMaxFractionalBig UFix64TypeMinIntBig = fixedpoint.UFix64TypeMinIntBig UFix64TypeMaxIntBig = fixedpoint.UFix64TypeMaxIntBig UFix64TypeMinFractionalBig = fixedpoint.UFix64TypeMinFractionalBig UFix64TypeMaxFractionalBig = fixedpoint.UFix64TypeMaxFractionalBig )
Numeric type ranges
var ( // NoTypeTag is a special tag to represent mask with no types included NoTypeTag = newTypeTagFromLowerMask(noTypeMask) SignedIntegerTypeTag = newTypeTagFromLowerMask(signedIntegerTypeMask). Or(IntTypeTag). Or(Int8TypeTag). Or(Int16TypeTag). Or(Int32TypeTag). Or(Int64TypeTag). Or(Int128TypeTag). Or(Int256TypeTag) UnsignedIntegerTypeTag = newTypeTagFromLowerMask(unsignedIntegerTypeMask). Or(UIntTypeTag). Or(UInt8TypeTag). Or(UInt16TypeTag). Or(UInt32TypeTag). Or(UInt64TypeTag). Or(UInt128TypeTag). Or(UInt256TypeTag). Or(Word8TypeTag). Or(Word16TypeTag). Or(Word32TypeTag). Or(Word64TypeTag) IntegerTypeTag = newTypeTagFromLowerMask(integerTypeMask). Or(SignedIntegerTypeTag). Or(UnsignedIntegerTypeTag) SignedFixedPointTypeTag = newTypeTagFromLowerMask(signedFixedPointTypeMask). Or(Fix64TypeTag) UnsignedFixedPointTypeTag = newTypeTagFromLowerMask(unsignedFixedPointTypeMask). Or(UFix64TypeTag) FixedPointTypeTag = newTypeTagFromLowerMask(fixedPointTypeMask). Or(SignedFixedPointTypeTag). Or(UnsignedFixedPointTypeTag) SignedNumberTypeTag = newTypeTagFromLowerMask(signedNumberTypeMask). Or(SignedIntegerTypeTag). Or(SignedFixedPointTypeTag) NumberTypeTag = newTypeTagFromLowerMask(numberTypeMask). Or(IntegerTypeTag). Or(FixedPointTypeTag). Or(SignedNumberTypeTag) UIntTypeTag = newTypeTagFromLowerMask(uintTypeMask) UInt8TypeTag = newTypeTagFromLowerMask(uint8TypeMask) UInt16TypeTag = newTypeTagFromLowerMask(uint16TypeMask) UInt32TypeTag = newTypeTagFromLowerMask(uint32TypeMask) UInt64TypeTag = newTypeTagFromLowerMask(uint64TypeMask) UInt128TypeTag = newTypeTagFromLowerMask(uint128TypeMask) UInt256TypeTag = newTypeTagFromLowerMask(uint256TypeMask) IntTypeTag = newTypeTagFromLowerMask(intTypeMask) Int8TypeTag = newTypeTagFromLowerMask(int8TypeMask) Int16TypeTag = newTypeTagFromLowerMask(int16TypeMask) Int32TypeTag = newTypeTagFromLowerMask(int32TypeMask) Int64TypeTag = newTypeTagFromLowerMask(int64TypeMask) Int128TypeTag = newTypeTagFromLowerMask(int128TypeMask) Int256TypeTag = newTypeTagFromLowerMask(int256TypeMask) Word8TypeTag = newTypeTagFromLowerMask(word8TypeMask) Word16TypeTag = newTypeTagFromLowerMask(word16TypeMask) Word32TypeTag = newTypeTagFromLowerMask(word32TypeMask) Word64TypeTag = newTypeTagFromLowerMask(word64TypeMask) Fix64TypeTag = newTypeTagFromLowerMask(fix64TypeMask) UFix64TypeTag = newTypeTagFromLowerMask(ufix64TypeMask) StringTypeTag = newTypeTagFromLowerMask(stringTypeMask) CharacterTypeTag = newTypeTagFromLowerMask(characterTypeMask) BoolTypeTag = newTypeTagFromLowerMask(boolTypeMask) NilTypeTag = newTypeTagFromLowerMask(nilTypeMask) VoidTypeTag = newTypeTagFromLowerMask(voidTypeMask) AddressTypeTag = newTypeTagFromLowerMask(addressTypeMask) MetaTypeTag = newTypeTagFromLowerMask(metaTypeMask) NeverTypeTag = newTypeTagFromLowerMask(neverTypeMask) BlockTypeTag = newTypeTagFromLowerMask(blockTypeMask) DeployedContractTypeTag = newTypeTagFromLowerMask(deployedContractMask) StoragePathTypeTag = newTypeTagFromLowerMask(storagePathTypeMask) PublicPathTypeTag = newTypeTagFromLowerMask(publicPathTypeMask) PrivatePathTypeTag = newTypeTagFromLowerMask(privatePathTypeMask) CapabilityPathTypeTag = newTypeTagFromLowerMask(capabilityPathTypeMask). Or(PublicPathTypeTag). Or(PrivatePathTypeTag) PathTypeTag = newTypeTagFromLowerMask(pathTypeMask). Or(CapabilityPathTypeTag). Or(StoragePathTypeTag) ConstantSizedTypeTag = newTypeTagFromLowerMask(constantSizedTypeMask) VariableSizedTypeTag = newTypeTagFromLowerMask(variableSizedTypeMask) DictionaryTypeTag = newTypeTagFromLowerMask(dictionaryTypeMask) CompositeTypeTag = newTypeTagFromLowerMask(compositeTypeMask) ReferenceTypeTag = newTypeTagFromLowerMask(referenceTypeMask) GenericTypeTag = newTypeTagFromLowerMask(genericTypeMask) FunctionTypeTag = newTypeTagFromLowerMask(functionTypeMask) InterfaceTypeTag = newTypeTagFromLowerMask(interfaceTypeMask) RestrictedTypeTag = newTypeTagFromUpperMask(restrictedTypeMask) CapabilityTypeTag = newTypeTagFromUpperMask(capabilityTypeMask) InvalidTypeTag = newTypeTagFromUpperMask(invalidTypeMask) TransactionTypeTag = newTypeTagFromUpperMask(transactionTypeMask) // AnyStructTypeTag only includes the types that are pre-known // to belong to AnyStruct type. This is more of an optimization. // Other types (derived types such as collections, etc.) are not possible // to be included in the mask without knowing their member types. // Hence, they are checked on demand in `getSuperTypeOfDerivedTypes()`. AnyStructTypeTag = newTypeTagFromLowerMask(anyStructTypeMask). Or(NeverTypeTag). Or(NumberTypeTag). Or(StringTypeTag). Or(ReferenceTypeTag). Or(NilTypeTag). Or(BoolTypeTag). Or(CharacterTypeTag). Or(VoidTypeTag). Or(MetaTypeTag). Or(PathTypeTag). Or(AddressTypeTag). Or(BlockTypeTag). Or(DeployedContractTypeTag). Or(CapabilityTypeTag). Or(FunctionTypeTag) AnyResourceTypeTag = newTypeTagFromLowerMask(anyResourceTypeMask) AnyTypeTag = newTypeTagFromLowerMask(anyTypeMask). Or(AnyStructTypeTag). Or(AnyResourceTypeTag). Or(ConstantSizedTypeTag). Or(VariableSizedTypeTag). Or(DictionaryTypeTag). Or(GenericTypeTag). Or(InterfaceTypeTag). Or(TransactionTypeTag). Or(RestrictedTypeTag) )
var AccessCheckModes = []AccessCheckMode{ AccessCheckModeStrict, AccessCheckModeNotSpecifiedRestricted, AccessCheckModeNotSpecifiedUnrestricted, AccessCheckModeNone, }
var AccountKeyType = func() *CompositeType { accountKeyType := &CompositeType{ Identifier: AccountKeyTypeName, Kind: common.CompositeKindStructure, importable: false, } const accountKeyIndexFieldDocString = `The index of the account key` const accountKeyPublicKeyFieldDocString = `The public key of the account` const accountKeyHashAlgorithmFieldDocString = `The hash algorithm used by the public key` const accountKeyWeightFieldDocString = `The weight assigned to the public key` const accountKeyIsRevokedFieldDocString = `Flag indicating whether the key is revoked` var members = []*Member{ NewUnmeteredPublicConstantFieldMember( accountKeyType, AccountKeyKeyIndexField, IntType, accountKeyIndexFieldDocString, ), NewUnmeteredPublicConstantFieldMember( accountKeyType, AccountKeyPublicKeyField, PublicKeyType, accountKeyPublicKeyFieldDocString, ), NewUnmeteredPublicConstantFieldMember( accountKeyType, AccountKeyHashAlgoField, HashAlgorithmType, accountKeyHashAlgorithmFieldDocString, ), NewUnmeteredPublicConstantFieldMember( accountKeyType, AccountKeyWeightField, UFix64Type, accountKeyWeightFieldDocString, ), NewUnmeteredPublicConstantFieldMember( accountKeyType, AccountKeyIsRevokedField, BoolType, accountKeyIsRevokedFieldDocString, ), } accountKeyType.Members = GetMembersAsMap(members) accountKeyType.Fields = GetFieldNames(members) return accountKeyType }()
AccountKeyType represents the key associated with an account.
var AccountKeysTypeCountFieldType = UInt64Type
var AccountKeysTypeForEachFunctionType = func() *FunctionType { iterFunctionType := &FunctionType{ Parameters: []*Parameter{ { TypeAnnotation: NewTypeAnnotation(AccountKeyType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(BoolType), } return &FunctionType{ Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "function", TypeAnnotation: NewTypeAnnotation(iterFunctionType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(VoidType), } }()
fun keys.forEach(_ function: ((AccountKey): Bool)): Void
var AccountKeysTypeGetFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: AccountKeyKeyIndexField, TypeAnnotation: NewTypeAnnotation(IntType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{Type: AccountKeyType}), RequiredArgumentCount: RequiredArgumentCount(1), }
var AccountTypeGetLinkTargetFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "capabilityPath", TypeAnnotation: NewTypeAnnotation(CapabilityPathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: PathType, }, ), }
var AddressConversionFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "value", TypeAnnotation: NewTypeAnnotation(IntegerType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&AddressType{}), ArgumentExpressionsCheck: func(checker *Checker, argumentExpressions []ast.Expression, _ ast.Range) { if len(argumentExpressions) < 1 { return } intExpression, ok := argumentExpressions[0].(*ast.IntegerExpression) if !ok { return } CheckAddressLiteral(nil, intExpression, checker.report) }, }
var AddressTypeMinIntBig = new(big.Int)
var AddressTypeToBytesFunctionType = &FunctionType{ Purity: FunctionPurityView, ReturnTypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }
var AllFixedPointTypes = append( append( AllUnsignedFixedPointTypes[:], AllSignedFixedPointTypes..., ), FixedPointType, SignedFixedPointType, )
var AllIntegerTypes = append( append( AllUnsignedIntegerTypes[:], AllSignedIntegerTypes..., ), IntegerType, SignedIntegerType, )
var AllNumberTypes = append( append( AllIntegerTypes[:], AllFixedPointTypes..., ), NumberType, SignedNumberType, )
var AllSignedFixedPointTypes = []Type{ Fix64Type, }
var AllSignedIntegerTypes = []Type{ IntType, Int8Type, Int16Type, Int32Type, Int64Type, Int128Type, Int256Type, }
var AllUnsignedFixedPointTypes = []Type{ UFix64Type, }
var AllUnsignedIntegerTypes = []Type{ UIntType, UInt8Type, UInt16Type, UInt32Type, UInt64Type, UInt128Type, UInt256Type, Word8Type, Word16Type, Word32Type, Word64Type, }
var AnyResourceType = &SimpleType{ Name: "AnyResource", QualifiedName: "AnyResource", TypeID: "AnyResource", tag: AnyResourceTypeTag, IsInvalid: false, IsResource: true, Storable: true, Equatable: false, ExternallyReturnable: true, Importable: false, }
AnyResourceType represents the top type of all resource types
var AnyStructType = &SimpleType{ Name: "AnyStruct", QualifiedName: "AnyStruct", TypeID: "AnyStruct", tag: AnyStructTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: true, Importable: true, }
AnyStructType represents the top type of all non-resource types
var AnyType = &SimpleType{ Name: "Any", QualifiedName: "Any", TypeID: "Any", tag: AnyTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: false, Importable: false, }
AnyType represents the top type of all types. NOTE: This type is only used internally and is not available in programs.
var AuthAccountContractsType = func() *CompositeType { authAccountContractsType := &CompositeType{ Identifier: AuthAccountContractsTypeName, Kind: common.CompositeKindStructure, importable: false, } var members = []*Member{ NewUnmeteredPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeAddFunctionName, AuthAccountContractsTypeAddFunctionType, authAccountContractsTypeAddFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeUpdateExperimentalFunctionName, AuthAccountContractsTypeUpdateExperimentalFunctionType, authAccountContractsTypeUpdateExperimentalFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeGetFunctionName, AuthAccountContractsTypeGetFunctionType, authAccountContractsTypeGetFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountContractsType, AuthAccountContractsTypeRemoveFunctionName, AuthAccountContractsTypeRemoveFunctionType, authAccountContractsTypeRemoveFunctionDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountContractsType, AuthAccountContractsTypeNamesField, &VariableSizedType{ Type: StringType, }, authAccountContractsTypeGetNamesDocString, ), } authAccountContractsType.Members = GetMembersAsMap(members) authAccountContractsType.Fields = GetFieldNames(members) return authAccountContractsType }()
AuthAccountContractsType represents the type `AuthAccount.Contracts`
var AuthAccountContractsTypeAddFunctionType = &FunctionType{ Parameters: []*Parameter{ { Identifier: "name", TypeAnnotation: NewTypeAnnotation( StringType, ), }, { Identifier: "code", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, }, ReturnTypeAnnotation: NewTypeAnnotation( DeployedContractType, ), RequiredArgumentCount: RequiredArgumentCount(2), }
var AuthAccountContractsTypeGetFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "name", TypeAnnotation: NewTypeAnnotation( StringType, ), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: DeployedContractType, }, ), }
var AuthAccountContractsTypeRemoveFunctionType = &FunctionType{ Parameters: []*Parameter{ { Identifier: "name", TypeAnnotation: NewTypeAnnotation(StringType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: DeployedContractType, }, ), }
var AuthAccountContractsTypeUpdateExperimentalFunctionType = &FunctionType{ Parameters: []*Parameter{ { Identifier: "name", TypeAnnotation: NewTypeAnnotation( StringType, ), }, { Identifier: "code", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, }, ReturnTypeAnnotation: NewTypeAnnotation( DeployedContractType, ), }
var AuthAccountForEachPrivateFunctionType = AccountForEachFunctionType(PrivatePathType)
var AuthAccountForEachPublicFunctionType = AccountForEachFunctionType(PublicPathType)
var AuthAccountForEachStoredFunctionType = AccountForEachFunctionType(StoragePathType)
var AuthAccountInboxType = func() *CompositeType { accountInbox := &CompositeType{ Identifier: AuthAccountInboxTypeName, Kind: common.CompositeKindStructure, importable: false, } var members = []*Member{ NewUnmeteredPublicFunctionMember( accountInbox, AuthAccountInboxClaimField, AuthAccountTypeInboxClaimFunctionType, authAccountTypeInboxClaimFunctionDocString, ), NewUnmeteredPublicFunctionMember( accountInbox, AuthAccountInboxPublishField, AuthAccountTypeInboxPublishFunctionType, authAccountTypeInboxPublishFunctionDocString, ), NewUnmeteredPublicFunctionMember( accountInbox, AuthAccountInboxUnpublishField, AuthAccountTypeInboxUnpublishFunctionType, authAccountTypeInboxUnpublishFunctionDocString, ), } accountInbox.Members = GetMembersAsMap(members) accountInbox.Fields = GetFieldNames(members) return accountInbox }()
AuthAccountInboxType represents the account's inbox.
var AuthAccountInboxTypeName = "Inbox"
var AuthAccountKeysType = func() *CompositeType { accountKeys := &CompositeType{ Identifier: AccountKeysTypeName, Kind: common.CompositeKindStructure, importable: false, } var members = []*Member{ NewUnmeteredPublicFunctionMember( accountKeys, AccountKeysAddFunctionName, AuthAccountKeysTypeAddFunctionType, authAccountKeysTypeAddFunctionDocString, ), NewUnmeteredPublicFunctionMember( accountKeys, AccountKeysGetFunctionName, AccountKeysTypeGetFunctionType, accountKeysTypeGetFunctionDocString, ), NewUnmeteredPublicFunctionMember( accountKeys, AccountKeysRevokeFunctionName, AuthAccountKeysTypeRevokeFunctionType, authAccountKeysTypeRevokeFunctionDocString, ), NewUnmeteredPublicFunctionMember( accountKeys, AccountKeysTypeForEachFunctionName, AccountKeysTypeForEachFunctionType, accountKeysTypeForEachFunctionDocString, ), NewUnmeteredPublicConstantFieldMember( accountKeys, AccountKeysCountFieldName, AccountKeysTypeCountFieldType, accountKeysTypeCountFieldDocString, ), } accountKeys.Members = GetMembersAsMap(members) accountKeys.Fields = GetFieldNames(members) return accountKeys }()
AuthAccountKeysType represents the keys associated with an auth account.
var AuthAccountKeysTypeAddFunctionType = &FunctionType{ Parameters: []*Parameter{ { Identifier: AccountKeyPublicKeyField, TypeAnnotation: NewTypeAnnotation(PublicKeyType), }, { Identifier: AccountKeyHashAlgoField, TypeAnnotation: NewTypeAnnotation(HashAlgorithmType), }, { Identifier: AccountKeyWeightField, TypeAnnotation: NewTypeAnnotation(UFix64Type), }, }, ReturnTypeAnnotation: NewTypeAnnotation(AccountKeyType), RequiredArgumentCount: RequiredArgumentCount(3), }
var AuthAccountKeysTypeRevokeFunctionType = &FunctionType{ Parameters: []*Parameter{ { Identifier: AccountKeyKeyIndexField, TypeAnnotation: NewTypeAnnotation(IntType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{Type: AccountKeyType}), RequiredArgumentCount: RequiredArgumentCount(1), }
var AuthAccountPrivatePathsType = &VariableSizedType{ Type: PrivatePathType, }
var AuthAccountPublicPathsType = &VariableSizedType{ Type: PublicPathType, }
var AuthAccountStoragePathsType = &VariableSizedType{ Type: StoragePathType, }
var AuthAccountType = func() *CompositeType { authAccountType := &CompositeType{ Identifier: AuthAccountTypeName, Kind: common.CompositeKindStructure, hasComputedMembers: true, importable: false, NestedTypes: func() *StringTypeOrderedMap { nestedTypes := &StringTypeOrderedMap{} nestedTypes.Set(AuthAccountContractsTypeName, AuthAccountContractsType) nestedTypes.Set(AccountKeysTypeName, AuthAccountKeysType) nestedTypes.Set(AuthAccountInboxTypeName, AuthAccountInboxType) return nestedTypes }(), } var members = []*Member{ NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountAddressField, &AddressType{}, accountTypeAddressFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountBalanceField, UFix64Type, accountTypeAccountBalanceFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountAvailableBalanceField, UFix64Type, accountTypeAccountAvailableBalanceFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountStorageUsedField, UInt64Type, accountTypeStorageUsedFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountStorageCapacityField, UInt64Type, accountTypeStorageCapacityFieldDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountSaveField, AuthAccountTypeSaveFunctionType, authAccountTypeSaveFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountTypeField, AuthAccountTypeTypeFunctionType, authAccountTypeTypeFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountLoadField, AuthAccountTypeLoadFunctionType, authAccountTypeLoadFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountCopyField, AuthAccountTypeCopyFunctionType, authAccountTypeCopyFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountBorrowField, AuthAccountTypeBorrowFunctionType, authAccountTypeBorrowFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountLinkField, AuthAccountTypeLinkFunctionType, authAccountTypeLinkFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountUnlinkField, AuthAccountTypeUnlinkFunctionType, authAccountTypeUnlinkFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountGetCapabilityField, AuthAccountTypeGetCapabilityFunctionType, authAccountTypeGetCapabilityFunctionDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountGetLinkTargetField, AccountTypeGetLinkTargetFunctionType, accountTypeGetLinkTargetFunctionDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountContractsField, AuthAccountContractsType, accountTypeContractsFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountKeysField, AuthAccountKeysType, accountTypeKeysFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountInboxField, AuthAccountInboxType, accountInboxDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountPublicPathsField, AuthAccountPublicPathsType, authAccountTypePublicPathsFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountPrivatePathsField, AuthAccountPrivatePathsType, authAccountTypePrivatePathsFieldDocString, ), NewUnmeteredPublicConstantFieldMember( authAccountType, AuthAccountStoragePathsField, AuthAccountStoragePathsType, authAccountTypeStoragePathsFieldDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountForEachPublicField, AuthAccountForEachPublicFunctionType, authAccountForEachPublicDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountForEachPrivateField, AuthAccountForEachPrivateFunctionType, authAccountForEachPrivateDocString, ), NewUnmeteredPublicFunctionMember( authAccountType, AuthAccountForEachStoredField, AuthAccountForEachStoredFunctionType, authAccountForEachStoredDocString, ), } authAccountType.Members = GetMembersAsMap(members) authAccountType.Fields = GetFieldNames(members) return authAccountType }()
AuthAccountType represents the authorized access to an account. Access to an AuthAccount means having full access to its storage, public keys, and code. Only signed transactions can get the AuthAccount for an account.
var AuthAccountTypeBorrowFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ TypeBound: &ReferenceType{ Type: AnyType, }, Name: "T", } return &FunctionType{ Purity: FunctionPurityView, TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: "from", Identifier: "path", TypeAnnotation: NewTypeAnnotation(StoragePathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: &GenericType{ TypeParameter: typeParameter, }, }, ), } }()
var AuthAccountTypeCopyFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ Name: "T", TypeBound: AnyStructType, } return &FunctionType{ Purity: FunctionPurityView, TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: "from", Identifier: "path", TypeAnnotation: NewTypeAnnotation(StoragePathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: &GenericType{ TypeParameter: typeParameter, }, }, ), } }()
var AuthAccountTypeGetCapabilityFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ TypeBound: &ReferenceType{ Type: AnyType, }, Name: "T", Optional: true, } return &FunctionType{ Purity: FunctionPurityView, TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "capabilityPath", TypeAnnotation: NewTypeAnnotation(CapabilityPathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &CapabilityType{ BorrowType: &GenericType{ TypeParameter: typeParameter, }, }, ), } }()
var AuthAccountTypeInboxClaimFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ Name: "T", TypeBound: &ReferenceType{ Type: AnyType, }, } return &FunctionType{ TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "name", TypeAnnotation: NewTypeAnnotation(StringType), }, { Identifier: "provider", TypeAnnotation: NewTypeAnnotation(&AddressType{}), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: &CapabilityType{ BorrowType: &GenericType{ TypeParameter: typeParameter, }, }, }, ), } }()
var AuthAccountTypeInboxPublishFunctionType = &FunctionType{ Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "value", TypeAnnotation: NewTypeAnnotation(&CapabilityType{}), }, { Identifier: "name", TypeAnnotation: NewTypeAnnotation(StringType), }, { Identifier: "recipient", TypeAnnotation: NewTypeAnnotation(&AddressType{}), }, }, ReturnTypeAnnotation: NewTypeAnnotation( VoidType, ), }
var AuthAccountTypeInboxUnpublishFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ Name: "T", TypeBound: &ReferenceType{ Type: AnyType, }, } return &FunctionType{ TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "name", TypeAnnotation: NewTypeAnnotation(StringType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: &CapabilityType{ BorrowType: &GenericType{ TypeParameter: typeParameter, }, }, }, ), } }()
var AuthAccountTypeLinkFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ TypeBound: &ReferenceType{ Type: AnyType, }, Name: "T", } return &FunctionType{ Purity: FunctionPurityImpure, TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "newCapabilityPath", TypeAnnotation: NewTypeAnnotation(CapabilityPathType), }, { Identifier: "target", TypeAnnotation: NewTypeAnnotation(PathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: &CapabilityType{ BorrowType: &GenericType{ TypeParameter: typeParameter, }, }, }, ), } }()
var AuthAccountTypeLoadFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ Name: "T", TypeBound: StorableType, } return &FunctionType{ TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: "from", Identifier: "path", TypeAnnotation: NewTypeAnnotation(StoragePathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: &GenericType{ TypeParameter: typeParameter, }, }, ), } }()
var AuthAccountTypeSaveFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ Name: "T", TypeBound: StorableType, } return &FunctionType{ TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "value", TypeAnnotation: NewTypeAnnotation( &GenericType{ TypeParameter: typeParameter, }, ), }, { Label: "to", Identifier: "path", TypeAnnotation: NewTypeAnnotation(StoragePathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(VoidType), } }()
var AuthAccountTypeTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: "at", Identifier: "path", TypeAnnotation: NewTypeAnnotation(StoragePathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: MetaType, }, ), }
var AuthAccountTypeUnlinkFunctionType = &FunctionType{ Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "capabilityPath", TypeAnnotation: NewTypeAnnotation(CapabilityPathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(VoidType), }
var BaseTypeActivation = NewVariableActivation(nil)
BaseTypeActivation is the base activation that contains the types available in programs
var BaseValueActivation = NewVariableActivation(nil)
BaseValueActivation is the base activation that contains the values available in programs
var BlockType = &SimpleType{ Name: "Block", QualifiedName: "Block", TypeID: "Block", tag: BlockTypeTag, IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, Importable: false, Members: func(t *SimpleType) map[string]MemberResolver { return map[string]MemberResolver{ BlockTypeHeightFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, UInt64Type, blockTypeHeightFieldDocString, ) }, }, BlockTypeViewFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, UInt64Type, blockTypeViewFieldDocString, ) }, }, BlockTypeTimestampFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, UFix64Type, blockTypeTimestampFieldDocString, ) }, }, BlockTypeIDFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, blockIDFieldType, blockTypeIDFieldDocString, ) }, }, } }, }
BlockType
var BoolType = &SimpleType{ Name: "Bool", QualifiedName: "Bool", TypeID: "Bool", tag: BoolTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, }
BoolType represents the boolean type
var ByteArrayArrayType = &VariableSizedType{ Type: ByteArrayType, }
ByteArrayArrayType represents the type [[UInt8]]
var ByteArrayType = &VariableSizedType{ Type: UInt8Type, }
ByteArrayType represents the type [UInt8]
var CapabilityPathType = &SimpleType{ Name: "CapabilityPath", QualifiedName: "CapabilityPath", TypeID: "CapabilityPath", tag: CapabilityPathTypeTag, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, IsSuperTypeOf: func(subType Type) bool { return IsSubType(subType, PrivatePathType) || IsSubType(subType, PublicPathType) }, }
CapabilityPathType
var CapabilityTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "type", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{MetaType}), }
var CharacterType = &SimpleType{ Name: "Character", QualifiedName: "Character", TypeID: "Character", tag: CharacterTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, }
CharacterType represents the character type
var CompositeTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "identifier", TypeAnnotation: NewTypeAnnotation(StringType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{MetaType}), }
var ConstantSizedArrayTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "type", TypeAnnotation: NewTypeAnnotation(MetaType), }, { Identifier: "size", TypeAnnotation: NewTypeAnnotation(IntType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(MetaType), }
var DeployedContractType = &SimpleType{ Name: "DeployedContract", QualifiedName: "DeployedContract", TypeID: "DeployedContract", tag: DeployedContractTypeTag, IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, Importable: false, Members: func(t *SimpleType) map[string]MemberResolver { return map[string]MemberResolver{ DeployedContractTypeAddressFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, &AddressType{}, deployedContractTypeAddressFieldDocString, ) }, }, DeployedContractTypeNameFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, StringType, deployedContractTypeNameFieldDocString, ) }, }, DeployedContractTypeCodeFieldName: { Kind: common.DeclarationKindField, Resolve: func(memoryGauge common.MemoryGauge, identifier string, _ ast.Range, _ func(error)) *Member { return NewPublicConstantFieldMember( memoryGauge, t, identifier, ByteArrayType, deployedContractTypeCodeFieldDocString, ) }, }, } }, }
DeployedContractType represents the type `DeployedContract`
var DictionaryTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "key", TypeAnnotation: NewTypeAnnotation(MetaType), }, { Identifier: "value", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{MetaType}), }
var FunctionTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "parameters", TypeAnnotation: NewTypeAnnotation(&VariableSizedType{Type: MetaType}), }, { Identifier: "return", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(MetaType), }
var GetTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, ReturnTypeAnnotation: NewTypeAnnotation( MetaType, ), }
var HashAlgorithmType = newNativeEnumType( HashAlgorithmTypeName, UInt8Type, func(enumType *CompositeType) []*Member { return []*Member{ NewUnmeteredPublicFunctionMember( enumType, HashAlgorithmTypeHashFunctionName, HashAlgorithmTypeHashFunctionType, HashAlgorithmTypeHashFunctionDocString, ), NewUnmeteredPublicFunctionMember( enumType, HashAlgorithmTypeHashWithTagFunctionName, HashAlgorithmTypeHashWithTagFunctionType, HashAlgorithmTypeHashWithTagFunctionDocString, ), } }, )
var HashAlgorithmTypeHashFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "data", TypeAnnotation: NewTypeAnnotation(ByteArrayType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }
var HashAlgorithmTypeHashWithTagFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "data", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, { Identifier: "tag", TypeAnnotation: NewTypeAnnotation(StringType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }
var HashAlgorithms = []CryptoAlgorithm{ HashAlgorithmSHA2_256, HashAlgorithmSHA2_384, HashAlgorithmSHA3_256, HashAlgorithmSHA3_384, HashAlgorithmKMAC128_BLS_BLS12_381, HashAlgorithmKECCAK_256, }
var InterfaceTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "identifier", TypeAnnotation: NewTypeAnnotation(StringType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{MetaType}), }
var InvalidType = &SimpleType{ Name: "<<invalid>>", QualifiedName: "<<invalid>>", TypeID: "<<invalid>>", tag: InvalidTypeTag, IsInvalid: true, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, Importable: false, }
InvalidType represents a type that is invalid. It is the result of type checking failing and can't be expressed in programs.
var IsInstanceFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "type", TypeAnnotation: NewTypeAnnotation( MetaType, ), }, }, ReturnTypeAnnotation: NewTypeAnnotation( BoolType, ), }
var MetaType = &SimpleType{ Name: MetaTypeName, QualifiedName: MetaTypeName, TypeID: MetaTypeName, tag: MetaTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, }
MetaType represents the type of a type.
var MetaTypeIsSubtypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: "of", Identifier: "otherType", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( BoolType, ), }
var NativeCompositeTypes = map[string]*CompositeType{}
var NeverType = &SimpleType{ Name: "Never", QualifiedName: "Never", TypeID: "Never", tag: NeverTypeTag, IsInvalid: false, IsResource: false, Storable: false, Equatable: false, ExternallyReturnable: false, Importable: false, }
NeverType represents the bottom type
var NilType = &OptionalType{ Type: NeverType, }
var OptionalTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "type", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(MetaType), }
var PathType = &SimpleType{ Name: "Path", QualifiedName: "Path", TypeID: "Path", tag: PathTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, IsSuperTypeOf: func(subType Type) bool { return IsSubType(subType, StoragePathType) || IsSubType(subType, CapabilityPathType) }, }
PathType
var PrivatePathConversionFunctionType = pathConversionFunctionType(PrivatePathType)
var PrivatePathType = &SimpleType{ Name: "PrivatePath", QualifiedName: "PrivatePath", TypeID: "PrivatePath", tag: PrivatePathTypeTag, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, }
PrivatePathType
var PublicAccountContractsType = func() *CompositeType { publicAccountContractsType := &CompositeType{ Identifier: PublicAccountContractsTypeName, Kind: common.CompositeKindStructure, importable: false, } var members = []*Member{ NewUnmeteredPublicFunctionMember( publicAccountContractsType, PublicAccountContractsTypeGetFunctionName, publicAccountContractsTypeGetFunctionType, publicAccountContractsTypeGetFunctionDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountContractsType, PublicAccountContractsTypeNamesField, &VariableSizedType{ Type: StringType, }, publicAccountContractsTypeNamesDocString, ), } publicAccountContractsType.Members = GetMembersAsMap(members) publicAccountContractsType.Fields = GetFieldNames(members) return publicAccountContractsType }()
PublicAccountContractsType represents the type `PublicAccount.Contracts`
var PublicAccountForEachPublicFunctionType = AccountForEachFunctionType(PublicPathType)
var PublicAccountKeysType = func() *CompositeType { accountKeys := &CompositeType{ Identifier: AccountKeysTypeName, Kind: common.CompositeKindStructure, importable: false, } var members = []*Member{ NewUnmeteredPublicFunctionMember( accountKeys, AccountKeysGetFunctionName, AccountKeysTypeGetFunctionType, accountKeysTypeGetFunctionDocString, ), NewUnmeteredPublicFunctionMember( accountKeys, AccountKeysTypeForEachFunctionName, AccountKeysTypeForEachFunctionType, accountKeysTypeForEachFunctionDocString, ), NewUnmeteredPublicConstantFieldMember( accountKeys, AccountKeysCountFieldName, AccountKeysTypeCountFieldType, accountKeysTypeCountFieldDocString, ), } accountKeys.Members = GetMembersAsMap(members) accountKeys.Fields = GetFieldNames(members) return accountKeys }()
PublicAccountKeysType represents the keys associated with a public account.
var PublicAccountPathsType = &VariableSizedType{ Type: PublicPathType, }
var PublicAccountType = func() *CompositeType { publicAccountType := &CompositeType{ Identifier: PublicAccountTypeName, Kind: common.CompositeKindStructure, hasComputedMembers: true, importable: false, NestedTypes: func() *StringTypeOrderedMap { nestedTypes := &StringTypeOrderedMap{} nestedTypes.Set(AccountKeysTypeName, PublicAccountKeysType) nestedTypes.Set(PublicAccountContractsTypeName, PublicAccountContractsType) return nestedTypes }(), } var members = []*Member{ NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountAddressField, &AddressType{}, accountTypeAddressFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountBalanceField, UFix64Type, accountTypeAccountBalanceFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountAvailableBalanceField, UFix64Type, accountTypeAccountAvailableBalanceFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountStorageUsedField, UInt64Type, accountTypeStorageUsedFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountStorageCapacityField, UInt64Type, accountTypeStorageCapacityFieldDocString, ), NewUnmeteredPublicFunctionMember( publicAccountType, PublicAccountGetCapabilityField, PublicAccountTypeGetCapabilityFunctionType, publicAccountTypeGetLinkTargetFunctionDocString, ), NewUnmeteredPublicFunctionMember( publicAccountType, PublicAccountGetTargetLinkField, AccountTypeGetLinkTargetFunctionType, accountTypeGetLinkTargetFunctionDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountKeysField, PublicAccountKeysType, accountTypeKeysFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountContractsField, PublicAccountContractsType, accountTypeContractsFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicAccountType, PublicAccountPathsField, PublicAccountPathsType, publicAccountTypePathsFieldDocString, ), NewUnmeteredPublicFunctionMember( publicAccountType, PublicAccountForEachPublicField, PublicAccountForEachPublicFunctionType, publicAccountForEachPublicDocString, ), } publicAccountType.Members = GetMembersAsMap(members) publicAccountType.Fields = GetFieldNames(members) return publicAccountType }()
PublicAccountType represents the publicly accessible portion of an account.
var PublicAccountTypeGetCapabilityFunctionType = func() *FunctionType { typeParameter := &TypeParameter{ TypeBound: &ReferenceType{ Type: AnyType, }, Name: "T", Optional: true, } return &FunctionType{ Purity: FunctionPurityView, TypeParameters: []*TypeParameter{ typeParameter, }, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "capabilityPath", TypeAnnotation: NewTypeAnnotation(PublicPathType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &CapabilityType{ BorrowType: &GenericType{ TypeParameter: typeParameter, }, }, ), } }()
var PublicKeyArrayType = &VariableSizedType{ Type: PublicKeyType, }
var PublicKeyType = func() *CompositeType { publicKeyType := &CompositeType{ Identifier: PublicKeyTypeName, Kind: common.CompositeKindStructure, hasComputedMembers: true, importable: true, } var members = []*Member{ NewUnmeteredPublicConstantFieldMember( publicKeyType, PublicKeyPublicKeyField, ByteArrayType, publicKeyKeyFieldDocString, ), NewUnmeteredPublicConstantFieldMember( publicKeyType, PublicKeySignAlgoField, SignatureAlgorithmType, publicKeySignAlgoFieldDocString, ), NewUnmeteredPublicFunctionMember( publicKeyType, PublicKeyVerifyFunction, PublicKeyVerifyFunctionType, publicKeyVerifyFunctionDocString, ), NewUnmeteredPublicFunctionMember( publicKeyType, PublicKeyVerifyPoPFunction, PublicKeyVerifyPoPFunctionType, publicKeyVerifyPoPFunctionDocString, ), } publicKeyType.Members = GetMembersAsMap(members) publicKeyType.Fields = GetFieldNames(members) return publicKeyType }()
PublicKeyType represents the public key associated with an account key.
var PublicKeyVerifyFunctionType = &FunctionType{ Purity: FunctionPurityView, TypeParameters: []*TypeParameter{}, Parameters: []*Parameter{ { Identifier: "signature", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, { Identifier: "signedData", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, { Identifier: "domainSeparationTag", TypeAnnotation: NewTypeAnnotation(StringType), }, { Identifier: "hashAlgorithm", TypeAnnotation: NewTypeAnnotation(HashAlgorithmType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(BoolType), }
var PublicKeyVerifyPoPFunctionType = &FunctionType{ Purity: FunctionPurityView, TypeParameters: []*TypeParameter{}, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "proof", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, }, ReturnTypeAnnotation: NewTypeAnnotation(BoolType), }
var PublicPathConversionFunctionType = pathConversionFunctionType(PublicPathType)
var PublicPathType = &SimpleType{ Name: "PublicPath", QualifiedName: "PublicPath", TypeID: "PublicPath", tag: PublicPathTypeTag, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, }
PublicPathType
var ReferenceTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "authorized", TypeAnnotation: NewTypeAnnotation(BoolType), }, { Identifier: "type", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(MetaType), }
var RestrictedTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "identifier", TypeAnnotation: NewTypeAnnotation(&OptionalType{StringType}), }, { Identifier: "restrictions", TypeAnnotation: NewTypeAnnotation(&VariableSizedType{Type: StringType}), }, }, ReturnTypeAnnotation: NewTypeAnnotation(&OptionalType{MetaType}), }
var SignatureAlgorithmType = newNativeEnumType( SignatureAlgorithmTypeName, UInt8Type, nil, )
var SignatureAlgorithms = []CryptoAlgorithm{ SignatureAlgorithmECDSA_P256, SignatureAlgorithmECDSA_secp256k1, SignatureAlgorithmBLS_BLS12_381, }
var StorableType = &SimpleType{ Name: "Storable", QualifiedName: "Storable", TypeID: "Storable", IsInvalid: false, IsResource: false, Storable: true, Equatable: false, ExternallyReturnable: false, Importable: false, IsSuperTypeOf: func(subType Type) bool { storableResults := map[*Member]bool{} return subType.IsStorable(storableResults) }, }
StorableType is the supertype of all types which are storable.
It is only used as e.g. a type bound, but is not accessible to user programs, i.e. can't be used in type annotations for e.g. parameters, return types, fields, etc.
var StoragePathConversionFunctionType = pathConversionFunctionType(StoragePathType)
var StoragePathType = &SimpleType{ Name: "StoragePath", QualifiedName: "StoragePath", TypeID: "StoragePath", tag: StoragePathTypeTag, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, }
StoragePathType
var StringFunctionType = func() *FunctionType { typeName := StringType.String() if BaseValueActivation.Find(typeName) != nil { panic(errors.NewUnreachableError()) } functionType := &FunctionType{ Purity: FunctionPurityView, ReturnTypeAnnotation: NewTypeAnnotation(StringType), } addMember := func(member *Member) { if functionType.Members == nil { functionType.Members = &StringMemberOrderedMap{} } name := member.Identifier.Identifier if functionType.Members.Contains(name) { panic(errors.NewUnreachableError()) } functionType.Members.Set(name, member) } addMember(NewUnmeteredPublicFunctionMember( functionType, StringTypeEncodeHexFunctionName, StringTypeEncodeHexFunctionType, StringTypeEncodeHexFunctionDocString, )) addMember(NewUnmeteredPublicFunctionMember( functionType, StringTypeFromUtf8FunctionName, StringTypeFromUtf8FunctionType, StringTypeFromUtf8FunctionDocString, )) addMember(NewUnmeteredPublicFunctionMember( functionType, StringTypeFromCharactersFunctionName, StringTypeFromCharactersFunctionType, StringTypeFromCharactersFunctionDocString, )) BaseValueActivation.Set( typeName, baseFunctionVariable( typeName, functionType, stringFunctionDocString, ), ) return functionType }()
var StringType = &SimpleType{ Name: "String", QualifiedName: "String", TypeID: "String", tag: StringTypeTag, IsInvalid: false, IsResource: false, Storable: true, Equatable: true, ExternallyReturnable: true, Importable: true, ValueIndexingInfo: ValueIndexingInfo{ IsValueIndexableType: true, AllowsValueIndexingAssignment: false, ElementType: func(_ bool) Type { return CharacterType }, IndexingType: IntegerType, }, }
StringType represents the string type
var StringTypeConcatFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "other", TypeAnnotation: NewTypeAnnotation(StringType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( StringType, ), }
var StringTypeDecodeHexFunctionType = &FunctionType{ Purity: FunctionPurityView, ReturnTypeAnnotation: NewTypeAnnotation(ByteArrayType), }
var StringTypeEncodeHexFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "data", TypeAnnotation: NewTypeAnnotation( ByteArrayType, ), }, }, ReturnTypeAnnotation: NewTypeAnnotation( StringType, ), }
var StringTypeFromCharactersFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "characters", TypeAnnotation: NewTypeAnnotation(&VariableSizedType{ Type: CharacterType, }), }, }, ReturnTypeAnnotation: NewTypeAnnotation( StringType, ), }
var StringTypeFromUtf8FunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "bytes", TypeAnnotation: NewTypeAnnotation(ByteArrayType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( &OptionalType{ Type: StringType, }, ), }
var StringTypeSliceFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Identifier: "from", TypeAnnotation: NewTypeAnnotation(IntType), }, { Identifier: "upTo", TypeAnnotation: NewTypeAnnotation(IntType), }, }, ReturnTypeAnnotation: NewTypeAnnotation( StringType, ), }
var StringTypeToLowerFunctionType = &FunctionType{ Purity: FunctionPurityView, ReturnTypeAnnotation: NewTypeAnnotation(StringType), }
var ToStringFunctionType = &FunctionType{ Purity: FunctionPurityView, ReturnTypeAnnotation: NewTypeAnnotation( StringType, ), }
var VariableSizedArrayTypeFunctionType = &FunctionType{ Purity: FunctionPurityView, Parameters: []*Parameter{ { Label: ArgumentLabelNotRequired, Identifier: "type", TypeAnnotation: NewTypeAnnotation(MetaType), }, }, ReturnTypeAnnotation: NewTypeAnnotation(MetaType), }
var VoidType = &SimpleType{ Name: "Void", QualifiedName: "Void", TypeID: "Void", tag: VoidTypeTag, IsInvalid: false, IsResource: false, Storable: false, Equatable: true, ExternallyReturnable: true, Importable: false, }
VoidType represents the void type
Functions ¶
func CheckAddressLiteral ¶ added in v0.12.0
func CheckAddressLiteral(memoryGauge common.MemoryGauge, expression *ast.IntegerExpression, report func(error)) bool
CheckAddressLiteral checks that the value of the integer literal fits into the range of an address (64 bits), and is hexadecimal
func CheckFixedPointLiteral ¶ added in v0.12.0
func CheckFixedPointLiteral( memoryGauge common.MemoryGauge, expression *ast.FixedPointExpression, targetType Type, report func(error), ) bool
CheckFixedPointLiteral checks that the value of the fixed-point literal fits into range of the target fixed-point type
func CheckIntegerLiteral ¶ added in v0.12.0
func CheckIntegerLiteral(memoryGauge common.MemoryGauge, expression *ast.IntegerExpression, targetType Type, report func(error)) bool
CheckIntegerLiteral checks that the value of the integer literal fits into range of the target integer type
func FailableCastCanSucceed ¶
FailableCastCanSucceed checks a failable (dynamic) cast, i.e. a cast that might succeed at run-time. It returns true if the cast from subType to superType could potentially succeed at run-time, and returns false if the cast will definitely always fail.
func FromStringFunctionDocstring ¶ added in v0.28.0
func FunctionEntryPointDeclaration ¶ added in v0.11.0
func FunctionEntryPointDeclaration(program *ast.Program) *ast.FunctionDeclaration
FunctionEntryPointDeclaration returns the entry point function declaration, if any.
Returns nil if there are multiple function declarations with the same function entry point name, or a transaction declaration.
func GetFieldNames ¶ added in v0.27.0
func IsProperSubType ¶ added in v0.17.0
IsProperSubType is similar to IsSubType, i.e. it determines if the given subtype is a subtype of the given supertype, but returns false if the subtype and supertype refer to the same type.
func IsSameTypeKind ¶ added in v0.24.0
IsSameTypeKind determines if the given subtype belongs to the same kind as the supertype.
e.g: 'Never' type is a subtype of 'Integer', but not of the same kind as 'Integer'. Whereas, 'Int8' is both a subtype and also of same kind as 'Integer'.
func IsSubType ¶
IsSubType determines if the given subtype is a subtype of the given supertype.
Types are subtypes of themselves.
NOTE: This method can be used to check the assignability of `subType` to `superType`. However, to check if a type *strictly* belongs to a certain category, then consider using `IsSameTypeKind` method. e.g: "Is type `T` an Integer type?". Using this method for the later use-case may produce incorrect results.
The differences between these methods is as follows:
IsSubType():
To check the assignability, e.g: is argument type T is a sub-type of parameter type R? This is the more frequent use-case.
IsSameTypeKind():
To check if a type strictly belongs to a certain category. e.g: Is the expression type T is any of the integer types, but nothing else. Another way to check is, asking the question of "if the subType is Never, should the check still pass?". A common code-smell for potential incorrect usage is, using IsSubType() method with a constant/pre-defined superType. e.g: IsSubType(<<someType>>, FixedPointType)
func IsValidAssignmentTargetExpression ¶ added in v0.8.0
func IsValidAssignmentTargetExpression(expression ast.Expression) bool
func IsValidCharacter ¶ added in v0.24.0
func IsValidEventParameterType ¶ added in v0.5.0
IsValidEventParameterType returns true if the given type is a valid event parameter type.
Events currently only support a few simple Cadence types.
func RequiredArgumentCount ¶ added in v0.10.0
func VisitThisAndNested ¶ added in v0.13.2
Types ¶
type AccessCheckMode ¶
type AccessCheckMode uint
const ( // AccessCheckModeDefault indicates the default access check mode should be used. AccessCheckModeDefault AccessCheckMode = iota // AccessCheckModeStrict indicates that access modifiers are required // and access checks are always enforced. AccessCheckModeStrict // AccessCheckModeNotSpecifiedRestricted indicates modifiers are optional. // Access is assumed private if not specified AccessCheckModeNotSpecifiedRestricted // AccessCheckModeNotSpecifiedUnrestricted indicates access modifiers are optional. // Access is assumed public if not specified AccessCheckModeNotSpecifiedUnrestricted // AccessCheckModeNone indicates access modifiers are optional and ignored. AccessCheckModeNone )
func (AccessCheckMode) String ¶
func (i AccessCheckMode) String() string
type AddressContractNamesResolver ¶ added in v0.25.0
type AddressType ¶
type AddressType struct{}
AddressType represents the address type
func (*AddressType) Equal ¶
func (*AddressType) Equal(other Type) bool
func (*AddressType) GetMembers ¶ added in v0.7.0
func (t *AddressType) GetMembers() map[string]MemberResolver
func (*AddressType) ID ¶
func (*AddressType) ID() TypeID
func (*AddressType) IsEquatable ¶ added in v0.7.0
func (*AddressType) IsEquatable() bool
func (*AddressType) IsExternallyReturnable ¶ added in v0.11.0
func (*AddressType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*AddressType) IsImportable ¶ added in v0.17.0
func (t *AddressType) IsImportable(_ map[*Member]bool) bool
func (*AddressType) IsInvalidType ¶
func (*AddressType) IsInvalidType() bool
func (*AddressType) IsResourceType ¶
func (*AddressType) IsResourceType() bool
func (*AddressType) IsStorable ¶ added in v0.5.0
func (*AddressType) IsStorable(_ map[*Member]bool) bool
func (*AddressType) IsSuperType ¶ added in v0.24.0
func (*AddressType) IsSuperType() bool
func (*AddressType) IsType ¶
func (*AddressType) IsType()
func (*AddressType) MaxInt ¶
func (*AddressType) MaxInt() *big.Int
func (*AddressType) MinInt ¶
func (*AddressType) MinInt() *big.Int
func (*AddressType) QualifiedString ¶
func (*AddressType) QualifiedString() string
func (*AddressType) Resolve ¶
func (t *AddressType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*AddressType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *AddressType) RewriteWithRestrictedTypes() (Type, bool)
func (*AddressType) String ¶
func (*AddressType) String() string
func (*AddressType) Tag ¶ added in v0.24.0
func (t *AddressType) Tag() TypeTag
func (*AddressType) TypeAnnotationState ¶
func (*AddressType) TypeAnnotationState() TypeAnnotationState
func (*AddressType) Unify ¶
func (*AddressType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type AlwaysFailingNonResourceCastingTypeError ¶
func (*AlwaysFailingNonResourceCastingTypeError) Error ¶
func (e *AlwaysFailingNonResourceCastingTypeError) Error() string
func (*AlwaysFailingNonResourceCastingTypeError) IsUserError ¶ added in v0.25.0
func (*AlwaysFailingNonResourceCastingTypeError) IsUserError()
type AlwaysFailingResourceCastingTypeError ¶
func (*AlwaysFailingResourceCastingTypeError) Error ¶
func (e *AlwaysFailingResourceCastingTypeError) Error() string
func (*AlwaysFailingResourceCastingTypeError) IsUserError ¶ added in v0.25.0
func (*AlwaysFailingResourceCastingTypeError) IsUserError()
type AmbiguousRestrictedTypeError ¶
func (*AmbiguousRestrictedTypeError) Error ¶
func (e *AmbiguousRestrictedTypeError) Error() string
func (*AmbiguousRestrictedTypeError) IsUserError ¶ added in v0.25.0
func (*AmbiguousRestrictedTypeError) IsUserError()
type ArgumentCountError ¶
func (*ArgumentCountError) Error ¶
func (e *ArgumentCountError) Error() string
func (*ArgumentCountError) IsUserError ¶ added in v0.25.0
func (*ArgumentCountError) IsUserError()
func (*ArgumentCountError) SecondaryError ¶
func (e *ArgumentCountError) SecondaryError() string
type ArgumentExpressionsCheck ¶ added in v0.9.0
type ArgumentExpressionsCheck func( checker *Checker, argumentExpressions []ast.Expression, invocationRange ast.Range, )
type ArrayExpressionTypes ¶ added in v0.26.0
type ArrayType ¶
type ArrayType interface { ValueIndexableType // contains filtered or unexported methods }
type AssignmentStatementTypes ¶ added in v0.26.0
type AssignmentToConstantError ¶
func (*AssignmentToConstantError) Error ¶
func (e *AssignmentToConstantError) Error() string
func (*AssignmentToConstantError) IsUserError ¶ added in v0.25.0
func (*AssignmentToConstantError) IsUserError()
type AssignmentToConstantMemberError ¶
func (*AssignmentToConstantMemberError) Error ¶
func (e *AssignmentToConstantMemberError) Error() string
func (*AssignmentToConstantMemberError) IsUserError ¶ added in v0.25.0
func (*AssignmentToConstantMemberError) IsUserError()
type BeforeExtractor ¶
type BeforeExtractor struct { ExpressionExtractor *ast.ExpressionExtractor // contains filtered or unexported fields }
func NewBeforeExtractor ¶
func NewBeforeExtractor(memoryGauge common.MemoryGauge, report func(error)) *BeforeExtractor
func (*BeforeExtractor) ExtractBefore ¶
func (e *BeforeExtractor) ExtractBefore(expression ast.Expression) ast.ExpressionExtraction
func (*BeforeExtractor) ExtractFunction ¶
func (e *BeforeExtractor) ExtractFunction( _ *ast.ExpressionExtractor, expression *ast.FunctionExpression, ) ast.ExpressionExtraction
func (*BeforeExtractor) ExtractInvocation ¶
func (e *BeforeExtractor) ExtractInvocation( extractor *ast.ExpressionExtractor, expression *ast.InvocationExpression, ) ast.ExpressionExtraction
type BinaryExpressionTypes ¶ added in v0.26.0
type BinaryOperationKind ¶
type BinaryOperationKind uint
const ( BinaryOperationKindUnknown BinaryOperationKind = iota BinaryOperationKindArithmetic BinaryOperationKindNonEqualityComparison BinaryOperationKindBooleanLogic BinaryOperationKindEquality BinaryOperationKindNilCoalescing BinaryOperationKindBitwise )
func (BinaryOperationKind) String ¶
func (i BinaryOperationKind) String() string
type CapabilityType ¶
type CapabilityType struct { BorrowType Type // contains filtered or unexported fields }
func NewCapabilityType ¶ added in v0.24.0
func NewCapabilityType(memoryGauge common.MemoryGauge, borrowType Type) *CapabilityType
func (*CapabilityType) BaseType ¶ added in v0.5.0
func (t *CapabilityType) BaseType() Type
func (*CapabilityType) Equal ¶
func (t *CapabilityType) Equal(other Type) bool
func (*CapabilityType) GetMembers ¶ added in v0.7.0
func (t *CapabilityType) GetMembers() map[string]MemberResolver
func (*CapabilityType) ID ¶
func (t *CapabilityType) ID() TypeID
func (*CapabilityType) Instantiate ¶ added in v0.5.0
func (t *CapabilityType) Instantiate(typeArguments []Type, _ func(err error)) Type
func (*CapabilityType) IsEquatable ¶ added in v0.7.0
func (*CapabilityType) IsEquatable() bool
func (*CapabilityType) IsExternallyReturnable ¶ added in v0.11.0
func (*CapabilityType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*CapabilityType) IsImportable ¶ added in v0.17.0
func (t *CapabilityType) IsImportable(_ map[*Member]bool) bool
func (*CapabilityType) IsInvalidType ¶
func (t *CapabilityType) IsInvalidType() bool
func (*CapabilityType) IsResourceType ¶
func (*CapabilityType) IsResourceType() bool
func (*CapabilityType) IsStorable ¶ added in v0.5.0
func (*CapabilityType) IsStorable(_ map[*Member]bool) bool
func (*CapabilityType) IsType ¶
func (*CapabilityType) IsType()
func (*CapabilityType) QualifiedString ¶
func (t *CapabilityType) QualifiedString() string
func (*CapabilityType) Resolve ¶
func (t *CapabilityType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*CapabilityType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *CapabilityType) RewriteWithRestrictedTypes() (Type, bool)
func (*CapabilityType) String ¶
func (t *CapabilityType) String() string
func (*CapabilityType) Tag ¶ added in v0.24.0
func (t *CapabilityType) Tag() TypeTag
func (*CapabilityType) TypeAnnotationState ¶
func (t *CapabilityType) TypeAnnotationState() TypeAnnotationState
func (*CapabilityType) TypeArguments ¶ added in v0.5.0
func (t *CapabilityType) TypeArguments() []Type
func (*CapabilityType) TypeParameters ¶ added in v0.5.0
func (t *CapabilityType) TypeParameters() []*TypeParameter
func (*CapabilityType) Unify ¶
func (t *CapabilityType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type CheckHandlerFunc ¶ added in v0.2.1
type CheckHandlerFunc func(checker *Checker, check func())
type Checker ¶
type Checker struct { Program *ast.Program Location common.Location Elaboration *Elaboration Config *Config PositionInfo *PositionInfo // contains filtered or unexported fields }
func NewChecker ¶
func (*Checker) CheckProgram ¶ added in v0.27.0
func (*Checker) CheckStatement ¶ added in v0.27.0
func (*Checker) CheckerError ¶
func (checker *Checker) CheckerError() *CheckerError
func (*Checker) ConvertType ¶
ConvertType converts an AST type representation to a sema type
func (*Checker) ConvertTypeAnnotation ¶
func (checker *Checker) ConvertTypeAnnotation(typeAnnotation *ast.TypeAnnotation) *TypeAnnotation
ConvertTypeAnnotation converts an AST type annotation representation to a sema type annotation
NOTE: type annotations ar *NOT* checked!
func (*Checker) CurrentPurityScope ¶ added in v0.32.0
func (checker *Checker) CurrentPurityScope() PurityCheckScope
func (*Checker) EnforcePurity ¶ added in v0.32.0
func (checker *Checker) EnforcePurity(operation ast.Element, purity FunctionPurity)
func (*Checker) EntryPointParameters ¶ added in v0.11.0
EntryPointParameters returns the parameters of the transaction or script, if any.
Returns nil if the program specifies both a valid transaction and entry point function declaration.
func (*Checker) InNewPurityScope ¶ added in v0.32.0
func (*Checker) ObserveImpureOperation ¶ added in v0.32.0
func (*Checker) PopPurityScope ¶ added in v0.32.0
func (checker *Checker) PopPurityScope() PurityCheckScope
func (*Checker) PushNewPurityScope ¶ added in v0.32.0
func (*Checker) ResetErrors ¶
func (checker *Checker) ResetErrors()
func (*Checker) SetMemoryGauge ¶ added in v0.24.0
func (checker *Checker) SetMemoryGauge(gauge common.MemoryGauge)
func (*Checker) SubChecker ¶ added in v0.13.0
func (*Checker) TypeActivationDepth ¶ added in v0.2.0
func (*Checker) ValueActivationDepth ¶ added in v0.2.0
func (*Checker) VisitArrayExpression ¶
func (checker *Checker) VisitArrayExpression(expression *ast.ArrayExpression) Type
func (*Checker) VisitAssignmentStatement ¶
func (checker *Checker) VisitAssignmentStatement(assignment *ast.AssignmentStatement) (_ struct{})
func (*Checker) VisitBinaryExpression ¶
func (checker *Checker) VisitBinaryExpression(expression *ast.BinaryExpression) Type
func (*Checker) VisitBoolExpression ¶
func (checker *Checker) VisitBoolExpression(_ *ast.BoolExpression) Type
func (*Checker) VisitBreakStatement ¶
func (checker *Checker) VisitBreakStatement(statement *ast.BreakStatement) (_ struct{})
func (*Checker) VisitCastingExpression ¶
func (checker *Checker) VisitCastingExpression(expression *ast.CastingExpression) Type
func (*Checker) VisitCompositeDeclaration ¶
func (checker *Checker) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) (_ struct{})
func (*Checker) VisitConditionalExpression ¶
func (checker *Checker) VisitConditionalExpression(expression *ast.ConditionalExpression) Type
func (*Checker) VisitContinueStatement ¶
func (checker *Checker) VisitContinueStatement(statement *ast.ContinueStatement) (_ struct{})
func (*Checker) VisitCreateExpression ¶
func (checker *Checker) VisitCreateExpression(expression *ast.CreateExpression) Type
func (*Checker) VisitDestroyExpression ¶
func (checker *Checker) VisitDestroyExpression(expression *ast.DestroyExpression) (resultType Type)
func (*Checker) VisitDictionaryExpression ¶
func (checker *Checker) VisitDictionaryExpression(expression *ast.DictionaryExpression) Type
func (*Checker) VisitEmitStatement ¶
func (checker *Checker) VisitEmitStatement(statement *ast.EmitStatement) (_ struct{})
func (*Checker) VisitEnumCaseDeclaration ¶ added in v0.10.0
func (checker *Checker) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) struct{}
func (*Checker) VisitExpression ¶ added in v0.16.0
func (checker *Checker) VisitExpression(expr ast.Expression, expectedType Type) Type
func (*Checker) VisitExpressionStatement ¶
func (checker *Checker) VisitExpressionStatement(statement *ast.ExpressionStatement) (_ struct{})
func (*Checker) VisitExpressionWithForceType ¶ added in v0.16.0
func (*Checker) VisitFieldDeclaration ¶
func (checker *Checker) VisitFieldDeclaration(_ *ast.FieldDeclaration) struct{}
func (*Checker) VisitFixedPointExpression ¶
func (checker *Checker) VisitFixedPointExpression(expression *ast.FixedPointExpression) Type
func (*Checker) VisitForStatement ¶
func (checker *Checker) VisitForStatement(statement *ast.ForStatement) (_ struct{})
func (*Checker) VisitForceExpression ¶
func (checker *Checker) VisitForceExpression(expression *ast.ForceExpression) Type
func (*Checker) VisitFunctionDeclaration ¶
func (checker *Checker) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) (_ struct{})
func (*Checker) VisitFunctionExpression ¶
func (checker *Checker) VisitFunctionExpression(expression *ast.FunctionExpression) Type
func (*Checker) VisitIdentifierExpression ¶
func (checker *Checker) VisitIdentifierExpression(expression *ast.IdentifierExpression) Type
func (*Checker) VisitIfStatement ¶
func (checker *Checker) VisitIfStatement(statement *ast.IfStatement) (_ struct{})
func (*Checker) VisitImportDeclaration ¶
func (checker *Checker) VisitImportDeclaration(declaration *ast.ImportDeclaration) struct{}
func (*Checker) VisitIndexExpression ¶
func (checker *Checker) VisitIndexExpression(expression *ast.IndexExpression) Type
func (*Checker) VisitIntegerExpression ¶
func (checker *Checker) VisitIntegerExpression(expression *ast.IntegerExpression) Type
func (*Checker) VisitInterfaceDeclaration ¶
func (checker *Checker) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) (_ struct{})
VisitInterfaceDeclaration checks the given interface declaration.
NOTE: This function assumes that the interface type was previously declared using `declareInterfaceType` and exists in `checker.Elaboration.InterfaceDeclarationTypes`, and that the members and nested declarations for the interface type were declared through `declareInterfaceMembers`.
func (*Checker) VisitInvocationExpression ¶
func (checker *Checker) VisitInvocationExpression(invocationExpression *ast.InvocationExpression) Type
func (*Checker) VisitMemberExpression ¶
func (checker *Checker) VisitMemberExpression(expression *ast.MemberExpression) Type
NOTE: only called if the member expression is *not* an assignment
func (*Checker) VisitNilExpression ¶
func (checker *Checker) VisitNilExpression(_ *ast.NilExpression) Type
func (*Checker) VisitPathExpression ¶
func (checker *Checker) VisitPathExpression(expression *ast.PathExpression) Type
func (*Checker) VisitPragmaDeclaration ¶ added in v0.7.0
func (checker *Checker) VisitPragmaDeclaration(p *ast.PragmaDeclaration) (_ struct{})
func (*Checker) VisitReferenceExpression ¶
func (checker *Checker) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) Type
VisitReferenceExpression checks a reference expression
func (*Checker) VisitReturnStatement ¶
func (checker *Checker) VisitReturnStatement(statement *ast.ReturnStatement) (_ struct{})
func (*Checker) VisitSpecialFunctionDeclaration ¶ added in v0.25.0
func (checker *Checker) VisitSpecialFunctionDeclaration(declaration *ast.SpecialFunctionDeclaration) struct{}
func (*Checker) VisitStringExpression ¶
func (checker *Checker) VisitStringExpression(expression *ast.StringExpression) Type
func (*Checker) VisitSwapStatement ¶
func (checker *Checker) VisitSwapStatement(swap *ast.SwapStatement) (_ struct{})
func (*Checker) VisitSwitchStatement ¶ added in v0.10.0
func (checker *Checker) VisitSwitchStatement(statement *ast.SwitchStatement) (_ struct{})
func (*Checker) VisitTransactionDeclaration ¶
func (checker *Checker) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) (_ struct{})
func (*Checker) VisitUnaryExpression ¶
func (checker *Checker) VisitUnaryExpression(expression *ast.UnaryExpression) Type
func (*Checker) VisitVariableDeclaration ¶
func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) (_ struct{})
func (*Checker) VisitVoidExpression ¶ added in v0.27.1
func (checker *Checker) VisitVoidExpression(_ *ast.VoidExpression) Type
func (*Checker) VisitWhileStatement ¶
func (checker *Checker) VisitWhileStatement(statement *ast.WhileStatement) (_ struct{})
type CheckerError ¶
type CheckerError struct { Location common.Location Codes map[common.Location][]byte Errors []error }
func (CheckerError) ChildErrors ¶
func (e CheckerError) ChildErrors() []error
func (CheckerError) Error ¶
func (e CheckerError) Error() string
func (CheckerError) ImportLocation ¶ added in v0.12.1
func (e CheckerError) ImportLocation() common.Location
func (CheckerError) IsUserError ¶ added in v0.25.0
func (CheckerError) IsUserError()
type CompositeKindMismatchError ¶
type CompositeKindMismatchError struct { ExpectedKind common.CompositeKind ActualKind common.CompositeKind ast.Range }
func (*CompositeKindMismatchError) Error ¶
func (e *CompositeKindMismatchError) Error() string
func (*CompositeKindMismatchError) IsUserError ¶ added in v0.25.0
func (*CompositeKindMismatchError) IsUserError()
func (*CompositeKindMismatchError) SecondaryError ¶
func (e *CompositeKindMismatchError) SecondaryError() string
type CompositeKindedType ¶
type CompositeKindedType interface { Type GetCompositeKind() common.CompositeKind }
CompositeKindedType is a type which has a composite kind
type CompositeType ¶
type CompositeType struct { Location common.Location Identifier string Kind common.CompositeKind ExplicitInterfaceConformances []*InterfaceType ImplicitTypeRequirementConformances []*CompositeType Members *StringMemberOrderedMap Fields []string // TODO: add support for overloaded initializers ConstructorParameters []*Parameter ConstructorPurity FunctionPurity NestedTypes *StringTypeOrderedMap EnumRawType Type // contains filtered or unexported fields }
func (*CompositeType) Equal ¶
func (t *CompositeType) Equal(other Type) bool
func (*CompositeType) ExplicitInterfaceConformanceSet ¶ added in v0.3.0
func (t *CompositeType) ExplicitInterfaceConformanceSet() *InterfaceSet
func (*CompositeType) FieldPosition ¶ added in v0.21.3
func (t *CompositeType) FieldPosition(name string, declaration *ast.CompositeDeclaration) ast.Position
func (*CompositeType) GetCompositeKind ¶
func (t *CompositeType) GetCompositeKind() common.CompositeKind
func (*CompositeType) GetContainerType ¶
func (t *CompositeType) GetContainerType() Type
func (*CompositeType) GetLocation ¶
func (t *CompositeType) GetLocation() common.Location
func (*CompositeType) GetMembers ¶ added in v0.7.0
func (t *CompositeType) GetMembers() map[string]MemberResolver
func (*CompositeType) GetNestedTypes ¶ added in v0.13.2
func (t *CompositeType) GetNestedTypes() *StringTypeOrderedMap
func (*CompositeType) ID ¶
func (t *CompositeType) ID() TypeID
func (*CompositeType) InterfaceType ¶
func (t *CompositeType) InterfaceType() *InterfaceType
func (*CompositeType) IsContainerType ¶ added in v0.20.3
func (t *CompositeType) IsContainerType() bool
func (*CompositeType) IsEquatable ¶ added in v0.7.0
func (t *CompositeType) IsEquatable() bool
func (*CompositeType) IsExternallyReturnable ¶ added in v0.11.0
func (t *CompositeType) IsExternallyReturnable(results map[*Member]bool) bool
func (*CompositeType) IsImportable ¶ added in v0.17.0
func (t *CompositeType) IsImportable(results map[*Member]bool) bool
func (*CompositeType) IsInvalidType ¶
func (*CompositeType) IsInvalidType() bool
func (*CompositeType) IsResourceType ¶
func (t *CompositeType) IsResourceType() bool
func (*CompositeType) IsStorable ¶ added in v0.5.0
func (t *CompositeType) IsStorable(results map[*Member]bool) bool
func (*CompositeType) IsType ¶
func (*CompositeType) IsType()
func (*CompositeType) MemberMap ¶ added in v0.32.0
func (t *CompositeType) MemberMap() *StringMemberOrderedMap
func (*CompositeType) QualifiedIdentifier ¶
func (t *CompositeType) QualifiedIdentifier() string
func (*CompositeType) QualifiedString ¶
func (t *CompositeType) QualifiedString() string
func (*CompositeType) Resolve ¶
func (t *CompositeType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*CompositeType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *CompositeType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*CompositeType) SetContainerType ¶ added in v0.17.0
func (t *CompositeType) SetContainerType(containerType Type)
func (*CompositeType) String ¶
func (t *CompositeType) String() string
func (*CompositeType) Tag ¶ added in v0.24.0
func (t *CompositeType) Tag() TypeTag
func (*CompositeType) TypeAnnotationState ¶
func (*CompositeType) TypeAnnotationState() TypeAnnotationState
func (*CompositeType) TypeRequirements ¶
func (t *CompositeType) TypeRequirements() []*CompositeType
func (*CompositeType) Unify ¶
func (*CompositeType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type Config ¶ added in v0.26.0
type Config struct { BaseTypeActivation *VariableActivation BaseValueActivation *VariableActivation // AccessCheckMode is the mode for access control checks. // It determines how access modifiers how existing and missing acess modifiers are treated. AccessCheckMode AccessCheckMode // ValidTopLevelDeclarationsHandler is used to determine the kinds of declarations // which are valid at the top-level for a given location. ValidTopLevelDeclarationsHandler ValidTopLevelDeclarationsHandlerFunc // LocationHandler is used to resolve locations. LocationHandler LocationHandlerFunc // ImportHandler is used to resolve unresolved imports. ImportHandler ImportHandlerFunc // CheckHandler is the function which is used for the checking of a program. CheckHandler CheckHandlerFunc // PositionInfoEnabled determines if position information is generated. // Position info includes origins, occurrences, member accesses, ranges, and function invocations. PositionInfoEnabled bool // ExtendedElaborationEnabled determines if extended elaboration information is generated. ExtendedElaborationEnabled bool // ErrorShortCircuitingEnabled determines if error short-circuiting is enabled. // When enabled, the checker will stop running once it encounters an error. // When disabled (the default), the checker reports the error then continues checking. ErrorShortCircuitingEnabled bool // MemberAccountAccessHandler is used to determine if the access of a member with account access modifier is valid. MemberAccountAccessHandler MemberAccountAccessHandlerFunc // ContractValueHandler is used to construct the contract variable ContractValueHandler ContractValueHandlerFunc }
type ConformanceError ¶
type ConformanceError struct { CompositeDeclaration *ast.CompositeDeclaration CompositeType *CompositeType InterfaceType *InterfaceType InitializerMismatch *InitializerMismatch MissingMembers []*Member MemberMismatches []MemberMismatch MissingNestedCompositeTypes []*CompositeType Pos ast.Position InterfaceTypeIsTypeRequirement bool }
func (*ConformanceError) EndPosition ¶
func (e *ConformanceError) EndPosition(common.MemoryGauge) ast.Position
func (*ConformanceError) Error ¶
func (e *ConformanceError) Error() string
func (*ConformanceError) ErrorNotes ¶ added in v0.2.0
func (e *ConformanceError) ErrorNotes() (notes []errors.ErrorNote)
func (*ConformanceError) IsUserError ¶ added in v0.25.0
func (*ConformanceError) IsUserError()
func (*ConformanceError) StartPosition ¶
func (e *ConformanceError) StartPosition() ast.Position
type ConstantSizedArrayLiteralSizeError ¶
func (*ConstantSizedArrayLiteralSizeError) Error ¶
func (e *ConstantSizedArrayLiteralSizeError) Error() string
func (*ConstantSizedArrayLiteralSizeError) IsUserError ¶ added in v0.25.0
func (*ConstantSizedArrayLiteralSizeError) IsUserError()
func (*ConstantSizedArrayLiteralSizeError) SecondaryError ¶
func (e *ConstantSizedArrayLiteralSizeError) SecondaryError() string
type ConstantSizedType ¶
ConstantSizedType is a constant sized array type
func NewConstantSizedType ¶ added in v0.24.0
func NewConstantSizedType(memoryGauge common.MemoryGauge, typ Type, size int64) *ConstantSizedType
func (*ConstantSizedType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (*ConstantSizedType) AllowsValueIndexingAssignment() bool
func (*ConstantSizedType) ElementType ¶
func (t *ConstantSizedType) ElementType(_ bool) Type
func (*ConstantSizedType) Equal ¶
func (t *ConstantSizedType) Equal(other Type) bool
func (*ConstantSizedType) GetMembers ¶ added in v0.7.0
func (t *ConstantSizedType) GetMembers() map[string]MemberResolver
func (*ConstantSizedType) ID ¶
func (t *ConstantSizedType) ID() TypeID
func (*ConstantSizedType) IndexingType ¶
func (t *ConstantSizedType) IndexingType() Type
func (*ConstantSizedType) IsEquatable ¶ added in v0.7.0
func (*ConstantSizedType) IsEquatable() bool
func (*ConstantSizedType) IsExternallyReturnable ¶ added in v0.11.0
func (t *ConstantSizedType) IsExternallyReturnable(results map[*Member]bool) bool
func (*ConstantSizedType) IsImportable ¶ added in v0.17.0
func (t *ConstantSizedType) IsImportable(results map[*Member]bool) bool
func (*ConstantSizedType) IsInvalidType ¶
func (t *ConstantSizedType) IsInvalidType() bool
func (*ConstantSizedType) IsResourceType ¶
func (t *ConstantSizedType) IsResourceType() bool
func (*ConstantSizedType) IsStorable ¶ added in v0.5.0
func (t *ConstantSizedType) IsStorable(results map[*Member]bool) bool
func (*ConstantSizedType) IsType ¶
func (*ConstantSizedType) IsType()
func (*ConstantSizedType) QualifiedString ¶
func (t *ConstantSizedType) QualifiedString() string
func (*ConstantSizedType) Resolve ¶
func (t *ConstantSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*ConstantSizedType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *ConstantSizedType) RewriteWithRestrictedTypes() (Type, bool)
func (*ConstantSizedType) String ¶
func (t *ConstantSizedType) String() string
func (*ConstantSizedType) Tag ¶ added in v0.24.0
func (t *ConstantSizedType) Tag() TypeTag
func (*ConstantSizedType) TypeAnnotationState ¶
func (t *ConstantSizedType) TypeAnnotationState() TypeAnnotationState
func (*ConstantSizedType) Unify ¶
func (t *ConstantSizedType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type ContainedType ¶
ContainedType is a type which might have a container type
type ContainerKind ¶
type ContainerKind uint
const ( ContainerKindUnknown ContainerKind = iota ContainerKindInterface ContainerKindComposite )
func (ContainerKind) String ¶
func (i ContainerKind) String() string
type ContainerType ¶
type ContainerType interface { Type IsContainerType() bool GetNestedTypes() *StringTypeOrderedMap }
ContainerType is a type which might have nested types
type ContractValueHandlerFunc ¶ added in v0.27.0
type ContractValueHandlerFunc func( checker *Checker, declaration *ast.CompositeDeclaration, compositeType *CompositeType, ) ValueDeclaration
type ControlStatementError ¶
type ControlStatementError struct { ControlStatement common.ControlStatement ast.Range }
func (*ControlStatementError) Error ¶
func (e *ControlStatementError) Error() string
func (*ControlStatementError) IsUserError ¶ added in v0.25.0
func (*ControlStatementError) IsUserError()
type CryptoAlgorithm ¶ added in v0.14.4
type CyclicImportsError ¶ added in v0.10.0
func (*CyclicImportsError) Error ¶ added in v0.10.0
func (e *CyclicImportsError) Error() string
func (*CyclicImportsError) IsUserError ¶ added in v0.25.0
func (*CyclicImportsError) IsUserError()
type DeclarationKindMismatchError ¶
type DeclarationKindMismatchError struct { ExpectedDeclarationKind common.DeclarationKind ActualDeclarationKind common.DeclarationKind ast.Range }
func (*DeclarationKindMismatchError) Error ¶
func (e *DeclarationKindMismatchError) Error() string
func (*DeclarationKindMismatchError) IsUserError ¶ added in v0.25.0
func (*DeclarationKindMismatchError) IsUserError()
func (*DeclarationKindMismatchError) SecondaryError ¶
func (e *DeclarationKindMismatchError) SecondaryError() string
type DefaultFunctionConflictError ¶ added in v0.26.0
type DefaultFunctionConflictError struct { CompositeType *CompositeType Member *Member }
DefaultFunctionConflictError
func (*DefaultFunctionConflictError) EndPosition ¶ added in v0.26.0
func (e *DefaultFunctionConflictError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*DefaultFunctionConflictError) Error ¶ added in v0.26.0
func (e *DefaultFunctionConflictError) Error() string
func (*DefaultFunctionConflictError) IsUserError ¶ added in v0.26.0
func (*DefaultFunctionConflictError) IsUserError()
func (*DefaultFunctionConflictError) StartPosition ¶ added in v0.26.0
func (e *DefaultFunctionConflictError) StartPosition() ast.Position
type DictionaryEntryType ¶
type DictionaryExpressionTypes ¶ added in v0.26.0
type DictionaryExpressionTypes struct { DictionaryType *DictionaryType EntryTypes []DictionaryEntryType }
type DictionaryType ¶
type DictionaryType struct { KeyType Type ValueType Type // contains filtered or unexported fields }
func NewDictionaryType ¶ added in v0.24.0
func NewDictionaryType(memoryGauge common.MemoryGauge, keyType, valueType Type) *DictionaryType
func (*DictionaryType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (*DictionaryType) AllowsValueIndexingAssignment() bool
func (*DictionaryType) ElementType ¶
func (t *DictionaryType) ElementType(_ bool) Type
func (*DictionaryType) Equal ¶
func (t *DictionaryType) Equal(other Type) bool
func (*DictionaryType) GetMembers ¶ added in v0.7.0
func (t *DictionaryType) GetMembers() map[string]MemberResolver
func (*DictionaryType) ID ¶
func (t *DictionaryType) ID() TypeID
func (*DictionaryType) IndexingType ¶
func (t *DictionaryType) IndexingType() Type
func (*DictionaryType) IsEquatable ¶ added in v0.7.0
func (*DictionaryType) IsEquatable() bool
func (*DictionaryType) IsExternallyReturnable ¶ added in v0.11.0
func (t *DictionaryType) IsExternallyReturnable(results map[*Member]bool) bool
func (*DictionaryType) IsImportable ¶ added in v0.17.0
func (t *DictionaryType) IsImportable(results map[*Member]bool) bool
func (*DictionaryType) IsInvalidType ¶
func (t *DictionaryType) IsInvalidType() bool
func (*DictionaryType) IsResourceType ¶
func (t *DictionaryType) IsResourceType() bool
func (*DictionaryType) IsStorable ¶ added in v0.5.0
func (t *DictionaryType) IsStorable(results map[*Member]bool) bool
func (*DictionaryType) IsType ¶
func (*DictionaryType) IsType()
func (*DictionaryType) QualifiedString ¶
func (t *DictionaryType) QualifiedString() string
func (*DictionaryType) Resolve ¶
func (t *DictionaryType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*DictionaryType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *DictionaryType) RewriteWithRestrictedTypes() (Type, bool)
func (*DictionaryType) String ¶
func (t *DictionaryType) String() string
func (*DictionaryType) Tag ¶ added in v0.24.0
func (t *DictionaryType) Tag() TypeTag
func (*DictionaryType) TypeAnnotationState ¶
func (t *DictionaryType) TypeAnnotationState() TypeAnnotationState
func (*DictionaryType) Unify ¶
func (t *DictionaryType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type DuplicateConformanceError ¶
type DuplicateConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType ast.Range }
DuplicateConformanceError
TODO: just make this a warning?
func (*DuplicateConformanceError) Error ¶
func (e *DuplicateConformanceError) Error() string
func (*DuplicateConformanceError) IsUserError ¶ added in v0.25.0
func (*DuplicateConformanceError) IsUserError()
type Elaboration ¶
type Elaboration struct { FunctionDeclarationFunctionTypes map[*ast.FunctionDeclaration]*FunctionType VariableDeclarationTypes map[*ast.VariableDeclaration]VariableDeclarationTypes AssignmentStatementTypes map[*ast.AssignmentStatement]AssignmentStatementTypes CompositeDeclarationTypes map[*ast.CompositeDeclaration]*CompositeType CompositeTypeDeclarations map[*CompositeType]*ast.CompositeDeclaration InterfaceDeclarationTypes map[*ast.InterfaceDeclaration]*InterfaceType InterfaceTypeDeclarations map[*InterfaceType]*ast.InterfaceDeclaration ConstructorFunctionTypes map[*ast.SpecialFunctionDeclaration]*FunctionType FunctionExpressionFunctionType map[*ast.FunctionExpression]*FunctionType InvocationExpressionTypes map[*ast.InvocationExpression]InvocationExpressionTypes CastingStaticValueTypes map[*ast.CastingExpression]Type CastingTargetTypes map[*ast.CastingExpression]Type ReturnStatementTypes map[*ast.ReturnStatement]ReturnStatementTypes BinaryExpressionTypes map[*ast.BinaryExpression]BinaryExpressionTypes MemberExpressionMemberInfos map[*ast.MemberExpression]MemberInfo MemberExpressionExpectedTypes map[*ast.MemberExpression]Type ArrayExpressionTypes map[*ast.ArrayExpression]ArrayExpressionTypes DictionaryExpressionTypes map[*ast.DictionaryExpression]DictionaryExpressionTypes IntegerExpressionType map[*ast.IntegerExpression]Type StringExpressionType map[*ast.StringExpression]Type FixedPointExpression map[*ast.FixedPointExpression]Type TransactionDeclarationTypes map[*ast.TransactionDeclaration]*TransactionType SwapStatementTypes map[*ast.SwapStatement]SwapStatementTypes // IsNestedResourceMoveExpression indicates if the access the index or member expression // is implicitly moving a resource out of the container, e.g. in a shift or swap statement. IsNestedResourceMoveExpression map[ast.Expression]struct{} CompositeNestedDeclarations map[*ast.CompositeDeclaration]map[string]ast.Declaration InterfaceNestedDeclarations map[*ast.InterfaceDeclaration]map[string]ast.Declaration PostConditionsRewrite map[*ast.Conditions]PostConditionsRewrite EmitStatementEventTypes map[*ast.EmitStatement]*CompositeType CompositeTypes map[TypeID]*CompositeType InterfaceTypes map[TypeID]*InterfaceType IdentifierInInvocationTypes map[*ast.IdentifierExpression]Type ImportDeclarationsResolvedLocations map[*ast.ImportDeclaration][]ResolvedLocation GlobalValues *StringVariableOrderedMap GlobalTypes *StringVariableOrderedMap TransactionTypes []*TransactionType ReferenceExpressionBorrowTypes map[*ast.ReferenceExpression]Type IndexExpressionTypes map[*ast.IndexExpression]IndexExpressionTypes ForceExpressionTypes map[*ast.ForceExpression]Type StaticCastTypes map[*ast.CastingExpression]CastTypes NumberConversionArgumentTypes map[ast.Expression]struct { Type Type Range ast.Range } RuntimeCastTypes map[*ast.CastingExpression]RuntimeCastTypes // contains filtered or unexported fields }
func NewElaboration ¶
func NewElaboration(gauge common.MemoryGauge, extendedElaboration bool) *Elaboration
func (*Elaboration) FunctionEntryPointType ¶ added in v0.13.0
func (e *Elaboration) FunctionEntryPointType() (*FunctionType, error)
FunctionEntryPointType returns the type of the entry point function declaration, if any.
Returns an error if no valid entry point function declaration exists.
func (*Elaboration) IsChecking ¶ added in v0.13.0
func (e *Elaboration) IsChecking() bool
type ElaborationImport ¶ added in v0.13.0
type ElaborationImport struct {
Elaboration *Elaboration
}
ElaborationImport
func (ElaborationImport) AllTypeElements ¶ added in v0.13.0
func (i ElaborationImport) AllTypeElements() *StringImportElementOrderedMap
func (ElaborationImport) AllValueElements ¶ added in v0.13.0
func (i ElaborationImport) AllValueElements() *StringImportElementOrderedMap
func (ElaborationImport) IsChecking ¶ added in v0.13.0
func (i ElaborationImport) IsChecking() bool
type EmitImportedEventError ¶
func (*EmitImportedEventError) Error ¶
func (e *EmitImportedEventError) Error() string
func (*EmitImportedEventError) IsUserError ¶ added in v0.25.0
func (*EmitImportedEventError) IsUserError()
type EmitNonEventError ¶
func (*EmitNonEventError) Error ¶
func (e *EmitNonEventError) Error() string
func (*EmitNonEventError) IsUserError ¶ added in v0.25.0
func (*EmitNonEventError) IsUserError()
type EndPositionGetter ¶ added in v0.24.0
type EndPositionGetter func(common.MemoryGauge) ast.Position
type ExternalMutationError ¶ added in v0.24.0
type ExternalMutationError struct { Name string ContainerType Type DeclarationKind common.DeclarationKind ast.Range }
func (*ExternalMutationError) Error ¶ added in v0.24.0
func (e *ExternalMutationError) Error() string
func (*ExternalMutationError) IsUserError ¶ added in v0.25.0
func (*ExternalMutationError) IsUserError()
func (*ExternalMutationError) SecondaryError ¶ added in v0.24.0
func (e *ExternalMutationError) SecondaryError() string
type FieldReinitializationError ¶ added in v0.24.0
FieldReinitializationError
func (*FieldReinitializationError) Error ¶ added in v0.24.0
func (e *FieldReinitializationError) Error() string
func (*FieldReinitializationError) IsUserError ¶ added in v0.25.0
func (*FieldReinitializationError) IsUserError()
type FieldTypeNotStorableError ¶ added in v0.5.0
type FieldTypeNotStorableError struct { // Field's name Name string // Field's type Type Type // Start position of the error Pos ast.Position }
func (*FieldTypeNotStorableError) EndPosition ¶ added in v0.10.0
func (e *FieldTypeNotStorableError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*FieldTypeNotStorableError) Error ¶ added in v0.5.0
func (e *FieldTypeNotStorableError) Error() string
func (*FieldTypeNotStorableError) IsUserError ¶ added in v0.25.0
func (*FieldTypeNotStorableError) IsUserError()
func (*FieldTypeNotStorableError) StartPosition ¶ added in v0.10.0
func (e *FieldTypeNotStorableError) StartPosition() ast.Position
type FieldUninitializedError ¶
FieldUninitializedError
func (*FieldUninitializedError) EndPosition ¶
func (e *FieldUninitializedError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*FieldUninitializedError) Error ¶
func (e *FieldUninitializedError) Error() string
func (*FieldUninitializedError) IsUserError ¶ added in v0.25.0
func (*FieldUninitializedError) IsUserError()
func (*FieldUninitializedError) SecondaryError ¶
func (e *FieldUninitializedError) SecondaryError() string
func (*FieldUninitializedError) StartPosition ¶
func (e *FieldUninitializedError) StartPosition() ast.Position
type FixedPointNumericType ¶ added in v0.15.0
type FixedPointNumericType struct {
// contains filtered or unexported fields
}
FixedPointNumericType represents all the types in the fixed-point range.
func NewFixedPointNumericType ¶ added in v0.15.0
func NewFixedPointNumericType(typeName string) *FixedPointNumericType
func (*FixedPointNumericType) AsSuperType ¶ added in v0.24.0
func (t *FixedPointNumericType) AsSuperType() *FixedPointNumericType
func (*FixedPointNumericType) Equal ¶ added in v0.15.0
func (t *FixedPointNumericType) Equal(other Type) bool
func (*FixedPointNumericType) GetMembers ¶ added in v0.15.0
func (t *FixedPointNumericType) GetMembers() map[string]MemberResolver
func (*FixedPointNumericType) ID ¶ added in v0.15.0
func (t *FixedPointNumericType) ID() TypeID
func (*FixedPointNumericType) IsEquatable ¶ added in v0.15.0
func (*FixedPointNumericType) IsEquatable() bool
func (*FixedPointNumericType) IsExternallyReturnable ¶ added in v0.15.0
func (*FixedPointNumericType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*FixedPointNumericType) IsImportable ¶ added in v0.17.0
func (t *FixedPointNumericType) IsImportable(_ map[*Member]bool) bool
func (*FixedPointNumericType) IsInvalidType ¶ added in v0.15.0
func (*FixedPointNumericType) IsInvalidType() bool
func (*FixedPointNumericType) IsResourceType ¶ added in v0.15.0
func (*FixedPointNumericType) IsResourceType() bool
func (*FixedPointNumericType) IsStorable ¶ added in v0.15.0
func (*FixedPointNumericType) IsStorable(_ map[*Member]bool) bool
func (*FixedPointNumericType) IsSuperType ¶ added in v0.24.0
func (t *FixedPointNumericType) IsSuperType() bool
func (*FixedPointNumericType) IsType ¶ added in v0.15.0
func (*FixedPointNumericType) IsType()
func (*FixedPointNumericType) MaxFractional ¶ added in v0.15.0
func (t *FixedPointNumericType) MaxFractional() *big.Int
func (*FixedPointNumericType) MaxInt ¶ added in v0.15.0
func (t *FixedPointNumericType) MaxInt() *big.Int
func (*FixedPointNumericType) MinFractional ¶ added in v0.15.0
func (t *FixedPointNumericType) MinFractional() *big.Int
func (*FixedPointNumericType) MinInt ¶ added in v0.15.0
func (t *FixedPointNumericType) MinInt() *big.Int
func (*FixedPointNumericType) QualifiedString ¶ added in v0.15.0
func (t *FixedPointNumericType) QualifiedString() string
func (*FixedPointNumericType) Resolve ¶ added in v0.15.0
func (t *FixedPointNumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*FixedPointNumericType) RewriteWithRestrictedTypes ¶ added in v0.15.0
func (t *FixedPointNumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*FixedPointNumericType) Scale ¶ added in v0.15.0
func (t *FixedPointNumericType) Scale() uint
func (*FixedPointNumericType) String ¶ added in v0.15.0
func (t *FixedPointNumericType) String() string
func (*FixedPointNumericType) SupportsSaturatingAdd ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingAdd() bool
func (*FixedPointNumericType) SupportsSaturatingDivide ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingDivide() bool
func (*FixedPointNumericType) SupportsSaturatingMultiply ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingMultiply() bool
func (*FixedPointNumericType) SupportsSaturatingSubtract ¶ added in v0.15.0
func (t *FixedPointNumericType) SupportsSaturatingSubtract() bool
func (*FixedPointNumericType) Tag ¶ added in v0.24.0
func (t *FixedPointNumericType) Tag() TypeTag
func (*FixedPointNumericType) TypeAnnotationState ¶ added in v0.15.0
func (*FixedPointNumericType) TypeAnnotationState() TypeAnnotationState
func (*FixedPointNumericType) Unify ¶ added in v0.15.0
func (*FixedPointNumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
func (*FixedPointNumericType) WithFractionalRange ¶ added in v0.15.0
func (t *FixedPointNumericType) WithFractionalRange( minFractional *big.Int, maxFractional *big.Int, ) *FixedPointNumericType
func (*FixedPointNumericType) WithIntRange ¶ added in v0.15.0
func (t *FixedPointNumericType) WithIntRange(minInt *big.Int, maxInt *big.Int) *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingAdd ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingAdd() *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingDivide ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingDivide() *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingMultiply ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingMultiply() *FixedPointNumericType
func (*FixedPointNumericType) WithSaturatingSubtract ¶ added in v0.15.0
func (t *FixedPointNumericType) WithSaturatingSubtract() *FixedPointNumericType
func (*FixedPointNumericType) WithScale ¶ added in v0.15.0
func (t *FixedPointNumericType) WithScale(scale uint) *FixedPointNumericType
func (*FixedPointNumericType) WithTag ¶ added in v0.24.0
func (t *FixedPointNumericType) WithTag(tag TypeTag) *FixedPointNumericType
type FractionalRangedType ¶
type FunctionActivation ¶
type FunctionActivation struct { ReturnType Type Loops int Switches int ValueActivationDepth int ReturnInfo *ReturnInfo InitializationInfo *InitializationInfo }
func (FunctionActivation) InLoop ¶
func (a FunctionActivation) InLoop() bool
func (FunctionActivation) InSwitch ¶ added in v0.10.0
func (a FunctionActivation) InSwitch() bool
func (*FunctionActivation) WithLoop ¶ added in v0.28.0
func (a *FunctionActivation) WithLoop(f func())
func (*FunctionActivation) WithSwitch ¶ added in v0.28.0
func (a *FunctionActivation) WithSwitch(f func())
type FunctionActivations ¶
type FunctionActivations struct {
// contains filtered or unexported fields
}
func (*FunctionActivations) Current ¶
func (a *FunctionActivations) Current() *FunctionActivation
func (*FunctionActivations) EnterFunction ¶
func (a *FunctionActivations) EnterFunction(functionType *FunctionType, valueActivationDepth int) *FunctionActivation
func (*FunctionActivations) IsLocal ¶
func (a *FunctionActivations) IsLocal() bool
func (*FunctionActivations) LeaveFunction ¶
func (a *FunctionActivations) LeaveFunction()
func (*FunctionActivations) WithFunction ¶
func (a *FunctionActivations) WithFunction( functionType *FunctionType, valueActivationDepth int, f func(activation *FunctionActivation), )
type FunctionExpressionInConditionError ¶
func (*FunctionExpressionInConditionError) Error ¶
func (e *FunctionExpressionInConditionError) Error() string
func (*FunctionExpressionInConditionError) IsUserError ¶ added in v0.25.0
func (*FunctionExpressionInConditionError) IsUserError()
type FunctionInvocation ¶ added in v0.17.0
type FunctionInvocation struct { StartPos Position EndPos Position FunctionType *FunctionType TrailingSeparatorPositions []ast.Position }
type FunctionInvocations ¶ added in v0.17.0
type FunctionInvocations struct {
// contains filtered or unexported fields
}
func NewFunctionInvocations ¶ added in v0.17.0
func NewFunctionInvocations() *FunctionInvocations
func (*FunctionInvocations) Find ¶ added in v0.17.0
func (f *FunctionInvocations) Find(pos Position) *FunctionInvocation
func (*FunctionInvocations) Put ¶ added in v0.17.0
func (f *FunctionInvocations) Put( startPos, endPos ast.Position, functionType *FunctionType, trailingSeparatorPositions []ast.Position, )
type FunctionPurity ¶ added in v0.32.0
type FunctionPurity int
func PurityFromAnnotation ¶ added in v0.32.0
func PurityFromAnnotation(purity ast.FunctionPurity) FunctionPurity
func (FunctionPurity) String ¶ added in v0.32.0
func (p FunctionPurity) String() string
type FunctionType ¶
type FunctionType struct { IsConstructor bool Purity FunctionPurity TypeParameters []*TypeParameter Parameters []*Parameter ReturnTypeAnnotation *TypeAnnotation RequiredArgumentCount *int ArgumentExpressionsCheck ArgumentExpressionsCheck Members *StringMemberOrderedMap }
func AccountForEachFunctionType ¶ added in v0.26.0
func AccountForEachFunctionType(pathType Type) *FunctionType
func ArrayAppendAllFunctionType ¶ added in v0.20.0
func ArrayAppendAllFunctionType(arrayType Type) *FunctionType
func ArrayAppendFunctionType ¶ added in v0.20.0
func ArrayAppendFunctionType(elementType Type) *FunctionType
func ArrayConcatFunctionType ¶ added in v0.20.0
func ArrayConcatFunctionType(arrayType Type) *FunctionType
func ArrayContainsFunctionType ¶ added in v0.20.0
func ArrayContainsFunctionType(elementType Type) *FunctionType
func ArrayFirstIndexFunctionType ¶ added in v0.24.0
func ArrayFirstIndexFunctionType(elementType Type) *FunctionType
func ArrayInsertFunctionType ¶ added in v0.20.0
func ArrayInsertFunctionType(elementType Type) *FunctionType
func ArrayRemoveFirstFunctionType ¶ added in v0.20.0
func ArrayRemoveFirstFunctionType(elementType Type) *FunctionType
func ArrayRemoveFunctionType ¶ added in v0.20.0
func ArrayRemoveFunctionType(elementType Type) *FunctionType
func ArrayRemoveLastFunctionType ¶ added in v0.20.0
func ArrayRemoveLastFunctionType(elementType Type) *FunctionType
func ArraySliceFunctionType ¶ added in v0.24.0
func ArraySliceFunctionType(elementType Type) *FunctionType
func CapabilityTypeBorrowFunctionType ¶ added in v0.20.0
func CapabilityTypeBorrowFunctionType(borrowType Type) *FunctionType
func CapabilityTypeCheckFunctionType ¶ added in v0.20.0
func CapabilityTypeCheckFunctionType(borrowType Type) *FunctionType
func CompositeConstructorType ¶ added in v0.27.0
func CompositeConstructorType( elaboration *Elaboration, compositeDeclaration *ast.CompositeDeclaration, compositeType *CompositeType, ) ( constructorFunctionType *FunctionType, argumentLabels []string, )
func DictionaryContainsKeyFunctionType ¶ added in v0.20.0
func DictionaryContainsKeyFunctionType(t *DictionaryType) *FunctionType
func DictionaryForEachKeyFunctionType ¶ added in v0.27.1
func DictionaryForEachKeyFunctionType(t *DictionaryType) *FunctionType
func DictionaryInsertFunctionType ¶ added in v0.20.0
func DictionaryInsertFunctionType(t *DictionaryType) *FunctionType
func DictionaryRemoveFunctionType ¶ added in v0.20.0
func DictionaryRemoveFunctionType(t *DictionaryType) *FunctionType
func EnumConstructorType ¶ added in v0.20.0
func EnumConstructorType(compositeType *CompositeType) *FunctionType
func FromStringFunctionType ¶ added in v0.28.0
func FromStringFunctionType(ty Type) *FunctionType
func NumberConversionFunctionType ¶ added in v0.21.2
func NumberConversionFunctionType(numberType Type) *FunctionType
func OptionalTypeMapFunctionType ¶ added in v0.20.0
func OptionalTypeMapFunctionType(typ Type) *FunctionType
func (*FunctionType) ArgumentLabels ¶
func (t *FunctionType) ArgumentLabels() (argumentLabels []string)
func (*FunctionType) CheckArgumentExpressions ¶
func (t *FunctionType) CheckArgumentExpressions( checker *Checker, argumentExpressions []ast.Expression, invocationRange ast.Range, )
func (*FunctionType) Equal ¶
func (t *FunctionType) Equal(other Type) bool
NOTE: parameter names and argument labels are intentionally *not* considered!
func (*FunctionType) GetMembers ¶ added in v0.7.0
func (t *FunctionType) GetMembers() map[string]MemberResolver
func (*FunctionType) HasSameArgumentLabels ¶ added in v0.7.0
func (t *FunctionType) HasSameArgumentLabels(other *FunctionType) bool
func (*FunctionType) ID ¶
func (t *FunctionType) ID() TypeID
NOTE: parameter names and argument labels are *not* part of the ID!
func (*FunctionType) IsEquatable ¶ added in v0.7.0
func (*FunctionType) IsEquatable() bool
func (*FunctionType) IsExternallyReturnable ¶ added in v0.11.0
func (t *FunctionType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*FunctionType) IsImportable ¶ added in v0.17.0
func (t *FunctionType) IsImportable(_ map[*Member]bool) bool
func (*FunctionType) IsInvalidType ¶
func (t *FunctionType) IsInvalidType() bool
func (*FunctionType) IsResourceType ¶
func (*FunctionType) IsResourceType() bool
func (*FunctionType) IsStorable ¶ added in v0.5.0
func (t *FunctionType) IsStorable(_ map[*Member]bool) bool
func (*FunctionType) IsType ¶
func (*FunctionType) IsType()
func (*FunctionType) QualifiedString ¶
func (t *FunctionType) QualifiedString() string
func (*FunctionType) Resolve ¶
func (t *FunctionType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*FunctionType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *FunctionType) RewriteWithRestrictedTypes() (Type, bool)
func (*FunctionType) String ¶
func (t *FunctionType) String() string
func (*FunctionType) Tag ¶ added in v0.24.0
func (t *FunctionType) Tag() TypeTag
func (*FunctionType) TypeAnnotationState ¶
func (t *FunctionType) TypeAnnotationState() TypeAnnotationState
func (*FunctionType) Unify ¶
func (t *FunctionType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) ( result bool, )
type GenericType ¶
type GenericType struct {
TypeParameter *TypeParameter
}
GenericType
func (*GenericType) Equal ¶
func (t *GenericType) Equal(other Type) bool
func (*GenericType) GetMembers ¶ added in v0.7.0
func (t *GenericType) GetMembers() map[string]MemberResolver
func (*GenericType) ID ¶
func (t *GenericType) ID() TypeID
func (*GenericType) IsEquatable ¶ added in v0.7.0
func (*GenericType) IsEquatable() bool
func (*GenericType) IsExternallyReturnable ¶ added in v0.11.0
func (*GenericType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*GenericType) IsImportable ¶ added in v0.17.0
func (t *GenericType) IsImportable(_ map[*Member]bool) bool
func (*GenericType) IsInvalidType ¶
func (*GenericType) IsInvalidType() bool
func (*GenericType) IsResourceType ¶
func (*GenericType) IsResourceType() bool
func (*GenericType) IsStorable ¶ added in v0.5.0
func (*GenericType) IsStorable(_ map[*Member]bool) bool
func (*GenericType) IsType ¶
func (*GenericType) IsType()
func (*GenericType) QualifiedString ¶
func (t *GenericType) QualifiedString() string
func (*GenericType) Resolve ¶
func (t *GenericType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*GenericType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *GenericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*GenericType) String ¶
func (t *GenericType) String() string
func (*GenericType) Tag ¶ added in v0.24.0
func (t *GenericType) Tag() TypeTag
func (*GenericType) TypeAnnotationState ¶
func (*GenericType) TypeAnnotationState() TypeAnnotationState
func (*GenericType) Unify ¶
func (t *GenericType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type HashAlgorithm ¶ added in v0.14.0
type HashAlgorithm uint8
const ( // Supported hashing algorithms HashAlgorithmUnknown HashAlgorithm = iota HashAlgorithmSHA2_256 HashAlgorithmSHA2_384 HashAlgorithmSHA3_256 HashAlgorithmSHA3_384 HashAlgorithmKMAC128_BLS_BLS12_381 HashAlgorithmKECCAK_256 )
func (HashAlgorithm) DocString ¶ added in v0.14.0
func (algo HashAlgorithm) DocString() string
func (HashAlgorithm) Name ¶ added in v0.14.0
func (algo HashAlgorithm) Name() string
func (HashAlgorithm) RawValue ¶ added in v0.14.0
func (algo HashAlgorithm) RawValue() uint8
func (HashAlgorithm) String ¶ added in v0.14.0
func (i HashAlgorithm) String() string
type Import ¶ added in v0.5.0
type Import interface { AllValueElements() *StringImportElementOrderedMap AllTypeElements() *StringImportElementOrderedMap IsChecking() bool }
type ImportElement ¶ added in v0.5.0
type ImportElement struct { DeclarationKind common.DeclarationKind Access ast.Access Type Type ArgumentLabels []string }
ImportElement
type ImportHandlerFunc ¶ added in v0.5.0
type ImportedProgramError ¶
func (*ImportedProgramError) ChildErrors ¶
func (e *ImportedProgramError) ChildErrors() []error
func (*ImportedProgramError) Error ¶
func (e *ImportedProgramError) Error() string
func (*ImportedProgramError) ImportLocation ¶
func (e *ImportedProgramError) ImportLocation() common.Location
func (*ImportedProgramError) IsUserError ¶ added in v0.25.0
func (*ImportedProgramError) IsUserError()
type IncorrectArgumentLabelError ¶
type IncorrectArgumentLabelError struct { ExpectedArgumentLabel string ActualArgumentLabel string ast.Range }
func (*IncorrectArgumentLabelError) Error ¶
func (e *IncorrectArgumentLabelError) Error() string
func (*IncorrectArgumentLabelError) IsUserError ¶ added in v0.25.0
func (*IncorrectArgumentLabelError) IsUserError()
func (*IncorrectArgumentLabelError) SecondaryError ¶
func (e *IncorrectArgumentLabelError) SecondaryError() string
type IncorrectTransferOperationError ¶
type IncorrectTransferOperationError struct { ActualOperation ast.TransferOperation ExpectedOperation ast.TransferOperation ast.Range }
func (*IncorrectTransferOperationError) Error ¶
func (e *IncorrectTransferOperationError) Error() string
func (*IncorrectTransferOperationError) IsUserError ¶ added in v0.25.0
func (*IncorrectTransferOperationError) IsUserError()
func (*IncorrectTransferOperationError) SecondaryError ¶
func (e *IncorrectTransferOperationError) SecondaryError() string
type IndexExpressionTypes ¶ added in v0.26.0
type IndexExpressionTypes struct { IndexedType ValueIndexableType IndexingType Type }
type InitializationInfo ¶
type InitializationInfo struct { ContainerType Type FieldMembers *MemberFieldDeclarationOrderedMap InitializedFieldMembers *persistent.OrderedSet[*Member] }
func NewInitializationInfo ¶
func NewInitializationInfo( containerType Type, fieldMembers *MemberFieldDeclarationOrderedMap, ) *InitializationInfo
func (*InitializationInfo) InitializationComplete ¶
func (info *InitializationInfo) InitializationComplete() bool
InitializationComplete returns true if all fields of the container were initialized, false if some fields are uninitialized
type InitializerMismatch ¶
type InitializerMismatch struct { CompositePurity FunctionPurity InterfacePurity FunctionPurity CompositeParameters []*Parameter InterfaceParameters []*Parameter }
type IntegerRangedType ¶
type InterfaceSet ¶
type InterfaceSet orderedmap.OrderedMap[*InterfaceType, struct{}]
func NewInterfaceSet ¶ added in v0.13.0
func NewInterfaceSet() *InterfaceSet
func (*InterfaceSet) Add ¶ added in v0.3.0
func (s *InterfaceSet) Add(interfaceType *InterfaceType)
func (InterfaceSet) Contains ¶ added in v0.28.0
func (s InterfaceSet) Contains(interfaceType *InterfaceType) bool
func (InterfaceSet) ForEach ¶ added in v0.13.0
func (s InterfaceSet) ForEach(f func(*InterfaceType))
func (InterfaceSet) IsSubsetOf ¶
func (s InterfaceSet) IsSubsetOf(other *InterfaceSet) bool
func (InterfaceSet) Len ¶ added in v0.13.0
func (s InterfaceSet) Len() int
type InterfaceType ¶
type InterfaceType struct { Location common.Location Identifier string CompositeKind common.CompositeKind Members *StringMemberOrderedMap Fields []string // TODO: add support for overloaded initializers InitializerParameters []*Parameter InitializerPurity FunctionPurity NestedTypes *StringTypeOrderedMap // contains filtered or unexported fields }
func (*InterfaceType) Equal ¶
func (t *InterfaceType) Equal(other Type) bool
func (*InterfaceType) FieldPosition ¶ added in v0.21.3
func (t *InterfaceType) FieldPosition(name string, declaration *ast.InterfaceDeclaration) ast.Position
func (*InterfaceType) GetCompositeKind ¶
func (t *InterfaceType) GetCompositeKind() common.CompositeKind
func (*InterfaceType) GetContainerType ¶
func (t *InterfaceType) GetContainerType() Type
func (*InterfaceType) GetLocation ¶
func (t *InterfaceType) GetLocation() common.Location
func (*InterfaceType) GetMembers ¶ added in v0.7.0
func (t *InterfaceType) GetMembers() map[string]MemberResolver
func (*InterfaceType) GetNestedTypes ¶ added in v0.13.2
func (t *InterfaceType) GetNestedTypes() *StringTypeOrderedMap
func (*InterfaceType) ID ¶
func (t *InterfaceType) ID() TypeID
func (*InterfaceType) IsContainerType ¶ added in v0.20.3
func (t *InterfaceType) IsContainerType() bool
func (*InterfaceType) IsEquatable ¶ added in v0.7.0
func (*InterfaceType) IsEquatable() bool
func (*InterfaceType) IsExternallyReturnable ¶ added in v0.11.0
func (t *InterfaceType) IsExternallyReturnable(results map[*Member]bool) bool
func (*InterfaceType) IsImportable ¶ added in v0.17.0
func (t *InterfaceType) IsImportable(results map[*Member]bool) bool
func (*InterfaceType) IsInvalidType ¶
func (t *InterfaceType) IsInvalidType() bool
func (*InterfaceType) IsResourceType ¶
func (t *InterfaceType) IsResourceType() bool
func (*InterfaceType) IsStorable ¶ added in v0.5.0
func (t *InterfaceType) IsStorable(results map[*Member]bool) bool
func (*InterfaceType) IsType ¶
func (*InterfaceType) IsType()
func (*InterfaceType) MemberMap ¶ added in v0.32.0
func (t *InterfaceType) MemberMap() *StringMemberOrderedMap
func (*InterfaceType) QualifiedIdentifier ¶
func (t *InterfaceType) QualifiedIdentifier() string
func (*InterfaceType) QualifiedString ¶
func (t *InterfaceType) QualifiedString() string
func (*InterfaceType) Resolve ¶
func (t *InterfaceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*InterfaceType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *InterfaceType) RewriteWithRestrictedTypes() (Type, bool)
func (*InterfaceType) SetContainerType ¶ added in v0.17.0
func (t *InterfaceType) SetContainerType(containerType Type)
func (*InterfaceType) String ¶
func (t *InterfaceType) String() string
func (*InterfaceType) Tag ¶ added in v0.24.0
func (t *InterfaceType) Tag() TypeTag
func (*InterfaceType) TypeAnnotationState ¶
func (*InterfaceType) TypeAnnotationState() TypeAnnotationState
func (*InterfaceType) Unify ¶
func (*InterfaceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type InvalidAccessError ¶
type InvalidAccessError struct { Name string RestrictingAccess ast.Access DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidAccessError) Error ¶
func (e *InvalidAccessError) Error() string
func (*InvalidAccessError) IsUserError ¶ added in v0.25.0
func (*InvalidAccessError) IsUserError()
type InvalidAccessModifierError ¶
type InvalidAccessModifierError struct { DeclarationKind common.DeclarationKind Explanation string Access ast.Access Pos ast.Position }
func (*InvalidAccessModifierError) EndPosition ¶
func (e *InvalidAccessModifierError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidAccessModifierError) Error ¶
func (e *InvalidAccessModifierError) Error() string
func (*InvalidAccessModifierError) IsUserError ¶ added in v0.25.0
func (*InvalidAccessModifierError) IsUserError()
func (*InvalidAccessModifierError) StartPosition ¶
func (e *InvalidAccessModifierError) StartPosition() ast.Position
type InvalidAddressLiteralError ¶
func (*InvalidAddressLiteralError) Error ¶
func (e *InvalidAddressLiteralError) Error() string
func (*InvalidAddressLiteralError) IsUserError ¶ added in v0.25.0
func (*InvalidAddressLiteralError) IsUserError()
type InvalidAssignmentAccessError ¶
type InvalidAssignmentAccessError struct { Name string RestrictingAccess ast.Access DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidAssignmentAccessError) Error ¶
func (e *InvalidAssignmentAccessError) Error() string
func (*InvalidAssignmentAccessError) IsUserError ¶ added in v0.25.0
func (*InvalidAssignmentAccessError) IsUserError()
func (*InvalidAssignmentAccessError) SecondaryError ¶
func (e *InvalidAssignmentAccessError) SecondaryError() string
type InvalidAssignmentTargetError ¶
func (*InvalidAssignmentTargetError) Error ¶
func (e *InvalidAssignmentTargetError) Error() string
func (*InvalidAssignmentTargetError) IsUserError ¶ added in v0.25.0
func (*InvalidAssignmentTargetError) IsUserError()
type InvalidBinaryOperandError ¶
type InvalidBinaryOperandError struct { Operation ast.Operation Side common.OperandSide ExpectedType Type ActualType Type ast.Range }
func (*InvalidBinaryOperandError) Error ¶
func (e *InvalidBinaryOperandError) Error() string
func (*InvalidBinaryOperandError) IsUserError ¶ added in v0.25.0
func (*InvalidBinaryOperandError) IsUserError()
func (*InvalidBinaryOperandError) SecondaryError ¶
func (e *InvalidBinaryOperandError) SecondaryError() string
type InvalidBinaryOperandsError ¶
type InvalidBinaryOperandsError struct { Operation ast.Operation LeftType Type RightType Type ast.Range }
func (*InvalidBinaryOperandsError) Error ¶
func (e *InvalidBinaryOperandsError) Error() string
func (*InvalidBinaryOperandsError) IsUserError ¶ added in v0.25.0
func (*InvalidBinaryOperandsError) IsUserError()
type InvalidCharacterLiteralError ¶
func (*InvalidCharacterLiteralError) Error ¶
func (e *InvalidCharacterLiteralError) Error() string
func (*InvalidCharacterLiteralError) IsUserError ¶ added in v0.25.0
func (*InvalidCharacterLiteralError) IsUserError()
func (*InvalidCharacterLiteralError) SecondaryError ¶
func (e *InvalidCharacterLiteralError) SecondaryError() string
type InvalidConditionalResourceOperandError ¶ added in v0.21.3
func (*InvalidConditionalResourceOperandError) Error ¶ added in v0.21.3
func (e *InvalidConditionalResourceOperandError) Error() string
type InvalidConformanceError ¶
func (*InvalidConformanceError) Error ¶
func (e *InvalidConformanceError) Error() string
func (*InvalidConformanceError) IsUserError ¶ added in v0.25.0
func (*InvalidConformanceError) IsUserError()
type InvalidConstantSizedTypeBaseError ¶
func (*InvalidConstantSizedTypeBaseError) Error ¶
func (e *InvalidConstantSizedTypeBaseError) Error() string
func (*InvalidConstantSizedTypeBaseError) IsUserError ¶ added in v0.25.0
func (*InvalidConstantSizedTypeBaseError) IsUserError()
func (*InvalidConstantSizedTypeBaseError) SecondaryError ¶
func (e *InvalidConstantSizedTypeBaseError) SecondaryError() string
type InvalidConstantSizedTypeSizeError ¶
type InvalidConstantSizedTypeSizeError struct { ActualSize *big.Int ExpectedMinInt *big.Int ExpectedMaxInt *big.Int ast.Range }
func (*InvalidConstantSizedTypeSizeError) Error ¶
func (e *InvalidConstantSizedTypeSizeError) Error() string
func (*InvalidConstantSizedTypeSizeError) IsUserError ¶ added in v0.25.0
func (*InvalidConstantSizedTypeSizeError) IsUserError()
func (*InvalidConstantSizedTypeSizeError) SecondaryError ¶
func (e *InvalidConstantSizedTypeSizeError) SecondaryError() string
type InvalidConstructionError ¶
func (*InvalidConstructionError) Error ¶
func (e *InvalidConstructionError) Error() string
func (*InvalidConstructionError) IsUserError ¶ added in v0.25.0
func (*InvalidConstructionError) IsUserError()
type InvalidDeclarationError ¶
type InvalidDeclarationError struct { Identifier string Kind common.DeclarationKind ast.Range }
func (*InvalidDeclarationError) Error ¶
func (e *InvalidDeclarationError) Error() string
func (*InvalidDeclarationError) IsUserError ¶ added in v0.25.0
func (*InvalidDeclarationError) IsUserError()
type InvalidDestructionError ¶
func (*InvalidDestructionError) Error ¶
func (e *InvalidDestructionError) Error() string
func (*InvalidDestructionError) IsUserError ¶ added in v0.25.0
func (*InvalidDestructionError) IsUserError()
type InvalidDestructorError ¶
func (*InvalidDestructorError) Error ¶
func (e *InvalidDestructorError) Error() string
func (*InvalidDestructorError) IsUserError ¶ added in v0.25.0
func (*InvalidDestructorError) IsUserError()
type InvalidDestructorParametersError ¶
func (*InvalidDestructorParametersError) Error ¶
func (e *InvalidDestructorParametersError) Error() string
func (*InvalidDestructorParametersError) IsUserError ¶ added in v0.25.0
func (*InvalidDestructorParametersError) IsUserError()
func (*InvalidDestructorParametersError) SecondaryError ¶
func (e *InvalidDestructorParametersError) SecondaryError() string
type InvalidDictionaryKeyTypeError ¶
func (*InvalidDictionaryKeyTypeError) Error ¶
func (e *InvalidDictionaryKeyTypeError) Error() string
func (*InvalidDictionaryKeyTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidDictionaryKeyTypeError) IsUserError()
type InvalidEntryPointTypeError ¶ added in v0.11.0
type InvalidEntryPointTypeError struct {
Type Type
}
func (*InvalidEntryPointTypeError) Error ¶ added in v0.11.0
func (e *InvalidEntryPointTypeError) Error() string
func (*InvalidEntryPointTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidEntryPointTypeError) IsUserError()
type InvalidEnumCaseError ¶ added in v0.10.0
type InvalidEnumCaseError struct { ContainerDeclarationKind common.DeclarationKind ast.Range }
func (*InvalidEnumCaseError) Error ¶ added in v0.10.0
func (e *InvalidEnumCaseError) Error() string
func (*InvalidEnumCaseError) IsUserError ¶ added in v0.25.0
func (*InvalidEnumCaseError) IsUserError()
type InvalidEnumConformancesError ¶ added in v0.10.0
func (*InvalidEnumConformancesError) Error ¶ added in v0.10.0
func (e *InvalidEnumConformancesError) Error() string
func (*InvalidEnumConformancesError) IsUserError ¶ added in v0.25.0
func (*InvalidEnumConformancesError) IsUserError()
type InvalidEnumRawTypeError ¶ added in v0.10.0
func (*InvalidEnumRawTypeError) Error ¶ added in v0.10.0
func (e *InvalidEnumRawTypeError) Error() string
func (*InvalidEnumRawTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidEnumRawTypeError) IsUserError()
type InvalidEventParameterTypeError ¶
func (*InvalidEventParameterTypeError) Error ¶
func (e *InvalidEventParameterTypeError) Error() string
func (*InvalidEventParameterTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidEventParameterTypeError) IsUserError()
type InvalidEventUsageError ¶
func (*InvalidEventUsageError) Error ¶
func (e *InvalidEventUsageError) Error() string
func (*InvalidEventUsageError) IsUserError ¶ added in v0.25.0
func (*InvalidEventUsageError) IsUserError()
type InvalidFailableResourceDowncastOutsideOptionalBindingError ¶
func (*InvalidFailableResourceDowncastOutsideOptionalBindingError) Error ¶
func (e *InvalidFailableResourceDowncastOutsideOptionalBindingError) Error() string
func (*InvalidFailableResourceDowncastOutsideOptionalBindingError) IsUserError ¶ added in v0.25.0
func (*InvalidFailableResourceDowncastOutsideOptionalBindingError) IsUserError()
type InvalidFixedPointLiteralRangeError ¶
type InvalidFixedPointLiteralRangeError struct { ExpectedType Type ExpectedMinInt *big.Int ExpectedMinFractional *big.Int ExpectedMaxInt *big.Int ExpectedMaxFractional *big.Int ast.Range }
func (*InvalidFixedPointLiteralRangeError) Error ¶
func (e *InvalidFixedPointLiteralRangeError) Error() string
func (*InvalidFixedPointLiteralRangeError) IsUserError ¶ added in v0.25.0
func (*InvalidFixedPointLiteralRangeError) IsUserError()
func (*InvalidFixedPointLiteralRangeError) SecondaryError ¶
func (e *InvalidFixedPointLiteralRangeError) SecondaryError() string
type InvalidFixedPointLiteralScaleError ¶
func (*InvalidFixedPointLiteralScaleError) Error ¶
func (e *InvalidFixedPointLiteralScaleError) Error() string
func (*InvalidFixedPointLiteralScaleError) IsUserError ¶ added in v0.25.0
func (*InvalidFixedPointLiteralScaleError) IsUserError()
func (*InvalidFixedPointLiteralScaleError) SecondaryError ¶
func (e *InvalidFixedPointLiteralScaleError) SecondaryError() string
type InvalidImplementationError ¶
type InvalidImplementationError struct { ImplementedKind common.DeclarationKind ContainerKind common.DeclarationKind Pos ast.Position }
func (*InvalidImplementationError) EndPosition ¶
func (e *InvalidImplementationError) EndPosition(common.MemoryGauge) ast.Position
func (*InvalidImplementationError) Error ¶
func (e *InvalidImplementationError) Error() string
func (*InvalidImplementationError) IsUserError ¶ added in v0.25.0
func (*InvalidImplementationError) IsUserError()
func (*InvalidImplementationError) StartPosition ¶
func (e *InvalidImplementationError) StartPosition() ast.Position
type InvalidIndexingError ¶
func (*InvalidIndexingError) Error ¶
func (e *InvalidIndexingError) Error() string
func (*InvalidIndexingError) IsUserError ¶ added in v0.25.0
func (*InvalidIndexingError) IsUserError()
func (*InvalidIndexingError) SecondaryError ¶
func (e *InvalidIndexingError) SecondaryError() string
type InvalidIntegerLiteralRangeError ¶
type InvalidIntegerLiteralRangeError struct { ExpectedType Type ExpectedMinInt *big.Int ExpectedMaxInt *big.Int ast.Range }
func (*InvalidIntegerLiteralRangeError) Error ¶
func (e *InvalidIntegerLiteralRangeError) Error() string
func (*InvalidIntegerLiteralRangeError) IsUserError ¶ added in v0.25.0
func (*InvalidIntegerLiteralRangeError) IsUserError()
func (*InvalidIntegerLiteralRangeError) SecondaryError ¶
func (e *InvalidIntegerLiteralRangeError) SecondaryError() string
type InvalidInterfaceDeclarationError ¶ added in v0.10.0
type InvalidInterfaceDeclarationError struct { CompositeKind common.CompositeKind ast.Range }
func (*InvalidInterfaceDeclarationError) Error ¶ added in v0.10.0
func (e *InvalidInterfaceDeclarationError) Error() string
func (*InvalidInterfaceDeclarationError) IsUserError ¶ added in v0.25.0
func (*InvalidInterfaceDeclarationError) IsUserError()
type InvalidInterfaceTypeError ¶
func (*InvalidInterfaceTypeError) Error ¶
func (e *InvalidInterfaceTypeError) Error() string
func (*InvalidInterfaceTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidInterfaceTypeError) IsUserError()
func (*InvalidInterfaceTypeError) SecondaryError ¶
func (e *InvalidInterfaceTypeError) SecondaryError() string
type InvalidMoveError ¶
type InvalidMoveError struct { Name string DeclarationKind common.DeclarationKind Pos ast.Position }
func (*InvalidMoveError) EndPosition ¶
func (e *InvalidMoveError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidMoveError) Error ¶
func (e *InvalidMoveError) Error() string
func (*InvalidMoveError) IsUserError ¶ added in v0.25.0
func (*InvalidMoveError) IsUserError()
func (*InvalidMoveError) StartPosition ¶
func (e *InvalidMoveError) StartPosition() ast.Position
type InvalidMoveOperationError ¶
func (*InvalidMoveOperationError) Error ¶
func (e *InvalidMoveOperationError) Error() string
func (*InvalidMoveOperationError) IsUserError ¶ added in v0.25.0
func (*InvalidMoveOperationError) IsUserError()
func (*InvalidMoveOperationError) SecondaryError ¶
func (e *InvalidMoveOperationError) SecondaryError() string
type InvalidNameError ¶
func (*InvalidNameError) EndPosition ¶
func (e *InvalidNameError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidNameError) Error ¶
func (e *InvalidNameError) Error() string
func (*InvalidNameError) IsUserError ¶ added in v0.25.0
func (*InvalidNameError) IsUserError()
func (*InvalidNameError) StartPosition ¶
func (e *InvalidNameError) StartPosition() ast.Position
type InvalidNestedDeclarationError ¶
type InvalidNestedDeclarationError struct { NestedDeclarationKind common.DeclarationKind ContainerDeclarationKind common.DeclarationKind ast.Range }
func (*InvalidNestedDeclarationError) Error ¶
func (e *InvalidNestedDeclarationError) Error() string
func (*InvalidNestedDeclarationError) IsUserError ¶ added in v0.25.0
func (*InvalidNestedDeclarationError) IsUserError()
type InvalidNestedResourceMoveError ¶
func (*InvalidNestedResourceMoveError) Error ¶
func (e *InvalidNestedResourceMoveError) Error() string
func (*InvalidNestedResourceMoveError) IsUserError ¶ added in v0.25.0
func (*InvalidNestedResourceMoveError) IsUserError()
type InvalidNestedTypeError ¶
type InvalidNestedTypeError struct {
Type *ast.NominalType
}
func (*InvalidNestedTypeError) EndPosition ¶
func (e *InvalidNestedTypeError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidNestedTypeError) Error ¶
func (e *InvalidNestedTypeError) Error() string
func (*InvalidNestedTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidNestedTypeError) IsUserError()
func (*InvalidNestedTypeError) StartPosition ¶
func (e *InvalidNestedTypeError) StartPosition() ast.Position
type InvalidNilCoalescingRightResourceOperandError ¶
func (*InvalidNilCoalescingRightResourceOperandError) Error ¶
func (e *InvalidNilCoalescingRightResourceOperandError) Error() string
type InvalidNonConformanceRestrictionError ¶
type InvalidNonConformanceRestrictionError struct { Type *InterfaceType ast.Range }
func (*InvalidNonConformanceRestrictionError) Error ¶
func (e *InvalidNonConformanceRestrictionError) Error() string
func (*InvalidNonConformanceRestrictionError) IsUserError ¶ added in v0.25.0
func (*InvalidNonConformanceRestrictionError) IsUserError()
type InvalidNonEnumCaseError ¶ added in v0.10.0
type InvalidNonEnumCaseError struct { ContainerDeclarationKind common.DeclarationKind ast.Range }
func (*InvalidNonEnumCaseError) Error ¶ added in v0.10.0
func (e *InvalidNonEnumCaseError) Error() string
func (*InvalidNonEnumCaseError) IsUserError ¶ added in v0.25.0
func (*InvalidNonEnumCaseError) IsUserError()
type InvalidNonIdentifierFailableResourceDowncast ¶ added in v0.12.0
func (*InvalidNonIdentifierFailableResourceDowncast) Error ¶ added in v0.12.0
func (e *InvalidNonIdentifierFailableResourceDowncast) Error() string
func (*InvalidNonIdentifierFailableResourceDowncast) IsUserError ¶ added in v0.25.0
func (*InvalidNonIdentifierFailableResourceDowncast) IsUserError()
func (*InvalidNonIdentifierFailableResourceDowncast) SecondaryError ¶ added in v0.12.0
func (e *InvalidNonIdentifierFailableResourceDowncast) SecondaryError() string
type InvalidNonImportableTransactionParameterTypeError ¶ added in v0.17.0
func (*InvalidNonImportableTransactionParameterTypeError) Error ¶ added in v0.17.0
func (e *InvalidNonImportableTransactionParameterTypeError) Error() string
func (*InvalidNonImportableTransactionParameterTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidNonImportableTransactionParameterTypeError) IsUserError()
type InvalidOptionalChainingError ¶
func (*InvalidOptionalChainingError) Error ¶
func (e *InvalidOptionalChainingError) Error() string
func (*InvalidOptionalChainingError) IsUserError ¶ added in v0.25.0
func (*InvalidOptionalChainingError) IsUserError()
type InvalidPathDomainError ¶
func (*InvalidPathDomainError) Error ¶
func (e *InvalidPathDomainError) Error() string
func (*InvalidPathDomainError) IsUserError ¶ added in v0.25.0
func (*InvalidPathDomainError) IsUserError()
func (*InvalidPathDomainError) SecondaryError ¶
func (e *InvalidPathDomainError) SecondaryError() string
type InvalidPathIdentifierError ¶ added in v0.23.0
func (*InvalidPathIdentifierError) Error ¶ added in v0.23.0
func (e *InvalidPathIdentifierError) Error() string
type InvalidPragmaError ¶ added in v0.7.0
func (*InvalidPragmaError) Error ¶ added in v0.7.0
func (e *InvalidPragmaError) Error() string
func (*InvalidPragmaError) IsUserError ¶ added in v0.25.0
func (*InvalidPragmaError) IsUserError()
type InvalidResourceAnnotationError ¶
func (*InvalidResourceAnnotationError) Error ¶
func (e *InvalidResourceAnnotationError) Error() string
func (*InvalidResourceAnnotationError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceAnnotationError) IsUserError()
type InvalidResourceArrayMemberError ¶
type InvalidResourceArrayMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceArrayMemberError) Error ¶
func (e *InvalidResourceArrayMemberError) Error() string
func (*InvalidResourceArrayMemberError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceArrayMemberError) IsUserError()
type InvalidResourceAssignmentError ¶
func (*InvalidResourceAssignmentError) Error ¶
func (e *InvalidResourceAssignmentError) Error() string
func (*InvalidResourceAssignmentError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceAssignmentError) IsUserError()
func (*InvalidResourceAssignmentError) SecondaryError ¶ added in v0.25.0
func (e *InvalidResourceAssignmentError) SecondaryError() string
type InvalidResourceCreationError ¶
func (*InvalidResourceCreationError) Error ¶
func (e *InvalidResourceCreationError) Error() string
func (*InvalidResourceCreationError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceCreationError) IsUserError()
type InvalidResourceDictionaryMemberError ¶
type InvalidResourceDictionaryMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceDictionaryMemberError) Error ¶
func (e *InvalidResourceDictionaryMemberError) Error() string
func (*InvalidResourceDictionaryMemberError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceDictionaryMemberError) IsUserError()
type InvalidResourceFieldError ¶
type InvalidResourceFieldError struct { Name string CompositeKind common.CompositeKind Pos ast.Position }
func (*InvalidResourceFieldError) EndPosition ¶
func (e *InvalidResourceFieldError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidResourceFieldError) Error ¶
func (e *InvalidResourceFieldError) Error() string
func (*InvalidResourceFieldError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceFieldError) IsUserError()
func (*InvalidResourceFieldError) StartPosition ¶
func (e *InvalidResourceFieldError) StartPosition() ast.Position
type InvalidResourceOptionalMemberError ¶ added in v0.9.0
type InvalidResourceOptionalMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceOptionalMemberError) Error ¶ added in v0.9.0
func (e *InvalidResourceOptionalMemberError) Error() string
func (*InvalidResourceOptionalMemberError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceOptionalMemberError) IsUserError()
type InvalidResourceTransactionParameterError ¶
func (*InvalidResourceTransactionParameterError) Error ¶
func (e *InvalidResourceTransactionParameterError) Error() string
func (*InvalidResourceTransactionParameterError) IsUserError ¶ added in v0.25.0
func (*InvalidResourceTransactionParameterError) IsUserError()
type InvalidRestrictedTypeError ¶
func (*InvalidRestrictedTypeError) Error ¶
func (e *InvalidRestrictedTypeError) Error() string
func (*InvalidRestrictedTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidRestrictedTypeError) IsUserError()
type InvalidRestrictedTypeMemberAccessError ¶
func (*InvalidRestrictedTypeMemberAccessError) Error ¶
func (e *InvalidRestrictedTypeMemberAccessError) Error() string
func (*InvalidRestrictedTypeMemberAccessError) IsUserError ¶ added in v0.25.0
func (*InvalidRestrictedTypeMemberAccessError) IsUserError()
type InvalidRestrictionTypeDuplicateError ¶
type InvalidRestrictionTypeDuplicateError struct { Type *InterfaceType ast.Range }
func (*InvalidRestrictionTypeDuplicateError) Error ¶
func (e *InvalidRestrictionTypeDuplicateError) Error() string
func (*InvalidRestrictionTypeDuplicateError) IsUserError ¶ added in v0.25.0
func (*InvalidRestrictionTypeDuplicateError) IsUserError()
type InvalidRestrictionTypeError ¶
func (*InvalidRestrictionTypeError) Error ¶
func (e *InvalidRestrictionTypeError) Error() string
func (*InvalidRestrictionTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidRestrictionTypeError) IsUserError()
type InvalidSelfInvalidationError ¶
type InvalidSelfInvalidationError struct { InvalidationKind ResourceInvalidationKind ast.Range }
func (*InvalidSelfInvalidationError) Error ¶
func (e *InvalidSelfInvalidationError) Error() string
func (*InvalidSelfInvalidationError) IsUserError ¶ added in v0.25.0
func (*InvalidSelfInvalidationError) IsUserError()
type InvalidSwapExpressionError ¶
type InvalidSwapExpressionError struct { Side common.OperandSide ast.Range }
func (*InvalidSwapExpressionError) Error ¶
func (e *InvalidSwapExpressionError) Error() string
func (*InvalidSwapExpressionError) IsUserError ¶ added in v0.25.0
func (*InvalidSwapExpressionError) IsUserError()
func (*InvalidSwapExpressionError) SecondaryError ¶
func (e *InvalidSwapExpressionError) SecondaryError() string
type InvalidTopLevelDeclarationError ¶
type InvalidTopLevelDeclarationError struct { DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidTopLevelDeclarationError) Error ¶
func (e *InvalidTopLevelDeclarationError) Error() string
func (*InvalidTopLevelDeclarationError) IsUserError ¶ added in v0.25.0
func (*InvalidTopLevelDeclarationError) IsUserError()
type InvalidTransactionBlockError ¶
func (*InvalidTransactionBlockError) EndPosition ¶
func (e *InvalidTransactionBlockError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidTransactionBlockError) Error ¶
func (e *InvalidTransactionBlockError) Error() string
func (*InvalidTransactionBlockError) IsUserError ¶ added in v0.25.0
func (*InvalidTransactionBlockError) IsUserError()
func (*InvalidTransactionBlockError) SecondaryError ¶
func (e *InvalidTransactionBlockError) SecondaryError() string
func (*InvalidTransactionBlockError) StartPosition ¶
func (e *InvalidTransactionBlockError) StartPosition() ast.Position
type InvalidTransactionFieldAccessModifierError ¶
type InvalidTransactionFieldAccessModifierError struct { Name string Access ast.Access Pos ast.Position }
func (*InvalidTransactionFieldAccessModifierError) EndPosition ¶
func (e *InvalidTransactionFieldAccessModifierError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*InvalidTransactionFieldAccessModifierError) Error ¶
func (e *InvalidTransactionFieldAccessModifierError) Error() string
func (*InvalidTransactionFieldAccessModifierError) IsUserError ¶ added in v0.25.0
func (*InvalidTransactionFieldAccessModifierError) IsUserError()
func (*InvalidTransactionFieldAccessModifierError) StartPosition ¶
func (e *InvalidTransactionFieldAccessModifierError) StartPosition() ast.Position
type InvalidTransactionPrepareParameterTypeError ¶
func (*InvalidTransactionPrepareParameterTypeError) Error ¶
func (e *InvalidTransactionPrepareParameterTypeError) Error() string
func (*InvalidTransactionPrepareParameterTypeError) IsUserError ¶ added in v0.25.0
func (*InvalidTransactionPrepareParameterTypeError) IsUserError()
type InvalidTypeArgumentCountError ¶
type InvalidTypeArgumentCountError struct { TypeParameterCount int TypeArgumentCount int ast.Range }
func (*InvalidTypeArgumentCountError) Error ¶
func (e *InvalidTypeArgumentCountError) Error() string
func (*InvalidTypeArgumentCountError) IsUserError ¶ added in v0.25.0
func (*InvalidTypeArgumentCountError) IsUserError()
func (*InvalidTypeArgumentCountError) SecondaryError ¶
func (e *InvalidTypeArgumentCountError) SecondaryError() string
type InvalidUnaryOperandError ¶
type InvalidUnaryOperandError struct { Operation ast.Operation ExpectedType Type ActualType Type ast.Range }
func (*InvalidUnaryOperandError) Error ¶
func (e *InvalidUnaryOperandError) Error() string
func (*InvalidUnaryOperandError) IsUserError ¶ added in v0.25.0
func (*InvalidUnaryOperandError) IsUserError()
func (*InvalidUnaryOperandError) SecondaryError ¶
func (e *InvalidUnaryOperandError) SecondaryError() string
type InvalidVariableKindError ¶
type InvalidVariableKindError struct { Kind ast.VariableKind ast.Range }
func (*InvalidVariableKindError) Error ¶
func (e *InvalidVariableKindError) Error() string
func (*InvalidVariableKindError) IsUserError ¶ added in v0.25.0
func (*InvalidVariableKindError) IsUserError()
type InvalidatedResourceReferenceError ¶ added in v0.32.0
type InvalidatedResourceReferenceError struct { Invalidation ResourceInvalidation ast.Range }
func (*InvalidatedResourceReferenceError) Error ¶ added in v0.32.0
func (e *InvalidatedResourceReferenceError) Error() string
func (*InvalidatedResourceReferenceError) ErrorNotes ¶ added in v0.32.0
func (e *InvalidatedResourceReferenceError) ErrorNotes() []errors.ErrorNote
func (*InvalidatedResourceReferenceError) IsUserError ¶ added in v0.32.0
func (*InvalidatedResourceReferenceError) IsUserError()
type InvocationExpressionTypes ¶ added in v0.26.0
type InvocationExpressionTypes struct { ArgumentTypes []Type TypeParameterTypes []Type ReturnType Type TypeArguments *TypeParameterTypeOrderedMap }
type LocatedType ¶
LocatedType is a type which has a location
type LocationHandlerFunc ¶ added in v0.10.0
type LocationHandlerFunc func(identifiers []ast.Identifier, location common.Location) ([]ResolvedLocation, error)
func AddressLocationHandlerFunc ¶ added in v0.25.0
func AddressLocationHandlerFunc(resolveAddressContractNames AddressContractNamesResolver) LocationHandlerFunc
AddressLocationHandlerFunc returns a location handler which returns a single location for non-address locations, and uses the given address contract names resolve function to get all contract names for an address
type Member ¶
type Member struct { // Parent type where this member can be resolved ContainerType Type Access ast.Access Identifier ast.Identifier TypeAnnotation *TypeAnnotation // TODO: replace with dedicated MemberKind enum DeclarationKind common.DeclarationKind VariableKind ast.VariableKind ArgumentLabels []string // Predeclared fields can be considered initialized Predeclared bool HasImplementation bool // IgnoreInSerialization fields are ignored in serialization IgnoreInSerialization bool DocString string }
func NewPublicFunctionMember ¶
func NewPublicFunctionMember( memoryGauge common.MemoryGauge, containerType Type, identifier string, functionType *FunctionType, docString string, ) *Member
func NewUnmeteredPublicConstantFieldMember ¶ added in v0.24.0
func NewUnmeteredPublicFunctionMember ¶ added in v0.24.0
func NewUnmeteredPublicFunctionMember( containerType Type, identifier string, functionType *FunctionType, docString string, ) *Member
func (*Member) IsExternallyReturnable ¶ added in v0.11.0
IsExternallyReturnable returns whether a member is externally returnable
func (*Member) IsImportable ¶ added in v0.17.0
IsImportable returns whether a member can be imported to a program
func (*Member) IsStorable ¶ added in v0.5.0
IsStorable returns whether a member is a storable field
type MemberAccess ¶ added in v0.7.0
type MemberAccesses ¶ added in v0.7.0
type MemberAccesses struct {
// contains filtered or unexported fields
}
func NewMemberAccesses ¶ added in v0.7.0
func NewMemberAccesses() *MemberAccesses
func (*MemberAccesses) All ¶ added in v0.7.0
func (m *MemberAccesses) All() []MemberAccess
func (*MemberAccesses) Find ¶ added in v0.7.0
func (m *MemberAccesses) Find(pos Position) *MemberAccess
type MemberAccountAccessHandlerFunc ¶ added in v0.19.0
type MemberFieldDeclarationOrderedMap ¶ added in v0.25.0
type MemberFieldDeclarationOrderedMap = orderedmap.OrderedMap[*Member, *ast.FieldDeclaration]
type MemberInfo ¶
type MemberMismatch ¶
type MemberMismatchNote ¶ added in v0.2.0
func (MemberMismatchNote) Message ¶ added in v0.2.0
func (n MemberMismatchNote) Message() string
type MemberResolver ¶ added in v0.7.0
type MemberResolver struct { Kind common.DeclarationKind Mutating bool Resolve func( memoryGauge common.MemoryGauge, identifier string, targetRange ast.Range, report func(error), ) *Member }
type MissingAccessModifierError ¶
type MissingAccessModifierError struct { DeclarationKind common.DeclarationKind Explanation string Pos ast.Position }
func (*MissingAccessModifierError) EndPosition ¶
func (e *MissingAccessModifierError) EndPosition(common.MemoryGauge) ast.Position
func (*MissingAccessModifierError) Error ¶
func (e *MissingAccessModifierError) Error() string
func (*MissingAccessModifierError) IsUserError ¶ added in v0.25.0
func (*MissingAccessModifierError) IsUserError()
func (*MissingAccessModifierError) StartPosition ¶
func (e *MissingAccessModifierError) StartPosition() ast.Position
type MissingArgumentLabelError ¶
func (*MissingArgumentLabelError) Error ¶
func (e *MissingArgumentLabelError) Error() string
func (*MissingArgumentLabelError) IsUserError ¶ added in v0.25.0
func (*MissingArgumentLabelError) IsUserError()
type MissingConformanceError ¶
type MissingConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType ast.Range }
MissingConformanceError
func (*MissingConformanceError) Error ¶
func (e *MissingConformanceError) Error() string
func (*MissingConformanceError) IsUserError ¶ added in v0.25.0
func (*MissingConformanceError) IsUserError()
type MissingCreateError ¶
func (*MissingCreateError) Error ¶
func (e *MissingCreateError) Error() string
func (*MissingCreateError) IsUserError ¶ added in v0.25.0
func (*MissingCreateError) IsUserError()
func (*MissingCreateError) SecondaryError ¶
func (e *MissingCreateError) SecondaryError() string
type MissingDestructorError ¶
type MissingDestructorError struct { ContainerType Type FirstFieldName string FirstFieldPos ast.Position }
func (*MissingDestructorError) EndPosition ¶
func (e *MissingDestructorError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*MissingDestructorError) Error ¶
func (e *MissingDestructorError) Error() string
func (*MissingDestructorError) IsUserError ¶ added in v0.25.0
func (*MissingDestructorError) IsUserError()
func (*MissingDestructorError) StartPosition ¶
func (e *MissingDestructorError) StartPosition() ast.Position
type MissingEntryPointError ¶ added in v0.11.0
type MissingEntryPointError struct {
Expected string
}
func (*MissingEntryPointError) Error ¶ added in v0.11.0
func (e *MissingEntryPointError) Error() string
func (*MissingEntryPointError) IsUserError ¶ added in v0.25.0
func (*MissingEntryPointError) IsUserError()
type MissingEnumRawTypeError ¶ added in v0.10.0
func (*MissingEnumRawTypeError) EndPosition ¶ added in v0.10.0
func (e *MissingEnumRawTypeError) EndPosition(common.MemoryGauge) ast.Position
func (*MissingEnumRawTypeError) Error ¶ added in v0.10.0
func (e *MissingEnumRawTypeError) Error() string
func (*MissingEnumRawTypeError) IsUserError ¶ added in v0.25.0
func (*MissingEnumRawTypeError) IsUserError()
func (*MissingEnumRawTypeError) StartPosition ¶ added in v0.10.0
func (e *MissingEnumRawTypeError) StartPosition() ast.Position
type MissingFunctionBodyError ¶
func (*MissingFunctionBodyError) EndPosition ¶
func (e *MissingFunctionBodyError) EndPosition(common.MemoryGauge) ast.Position
func (*MissingFunctionBodyError) Error ¶
func (e *MissingFunctionBodyError) Error() string
func (*MissingFunctionBodyError) IsUserError ¶ added in v0.25.0
func (*MissingFunctionBodyError) IsUserError()
func (*MissingFunctionBodyError) StartPosition ¶
func (e *MissingFunctionBodyError) StartPosition() ast.Position
type MissingInitializerError ¶
type MissingInitializerError struct { ContainerType Type FirstFieldName string FirstFieldPos ast.Position }
func (*MissingInitializerError) EndPosition ¶
func (e *MissingInitializerError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*MissingInitializerError) Error ¶
func (e *MissingInitializerError) Error() string
func (*MissingInitializerError) IsUserError ¶ added in v0.25.0
func (*MissingInitializerError) IsUserError()
func (*MissingInitializerError) StartPosition ¶
func (e *MissingInitializerError) StartPosition() ast.Position
type MissingMoveOperationError ¶
func (*MissingMoveOperationError) EndPosition ¶
func (e *MissingMoveOperationError) EndPosition(common.MemoryGauge) ast.Position
func (*MissingMoveOperationError) Error ¶
func (e *MissingMoveOperationError) Error() string
func (*MissingMoveOperationError) IsUserError ¶ added in v0.25.0
func (*MissingMoveOperationError) IsUserError()
func (*MissingMoveOperationError) StartPosition ¶
func (e *MissingMoveOperationError) StartPosition() ast.Position
type MissingResourceAnnotationError ¶
func (*MissingResourceAnnotationError) Error ¶
func (e *MissingResourceAnnotationError) Error() string
func (*MissingResourceAnnotationError) IsUserError ¶ added in v0.25.0
func (*MissingResourceAnnotationError) IsUserError()
type MissingReturnStatementError ¶
func (*MissingReturnStatementError) Error ¶
func (e *MissingReturnStatementError) Error() string
func (*MissingReturnStatementError) IsUserError ¶ added in v0.25.0
func (*MissingReturnStatementError) IsUserError()
type MissingReturnValueError ¶ added in v0.5.0
func (*MissingReturnValueError) Error ¶ added in v0.5.0
func (e *MissingReturnValueError) Error() string
func (*MissingReturnValueError) IsUserError ¶ added in v0.25.0
func (*MissingReturnValueError) IsUserError()
type MissingSwitchCaseStatementsError ¶ added in v0.10.0
func (*MissingSwitchCaseStatementsError) EndPosition ¶ added in v0.10.0
func (e *MissingSwitchCaseStatementsError) EndPosition(common.MemoryGauge) ast.Position
func (*MissingSwitchCaseStatementsError) Error ¶ added in v0.10.0
func (e *MissingSwitchCaseStatementsError) Error() string
func (*MissingSwitchCaseStatementsError) IsUserError ¶ added in v0.25.0
func (*MissingSwitchCaseStatementsError) IsUserError()
func (*MissingSwitchCaseStatementsError) StartPosition ¶ added in v0.10.0
func (e *MissingSwitchCaseStatementsError) StartPosition() ast.Position
type MultipleInterfaceDefaultImplementationsError ¶ added in v0.26.0
type MultipleInterfaceDefaultImplementationsError struct { CompositeType *CompositeType Member *Member }
MultipleInterfaceDefaultImplementationsError
func (*MultipleInterfaceDefaultImplementationsError) EndPosition ¶ added in v0.26.0
func (e *MultipleInterfaceDefaultImplementationsError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*MultipleInterfaceDefaultImplementationsError) Error ¶ added in v0.26.0
func (e *MultipleInterfaceDefaultImplementationsError) Error() string
func (*MultipleInterfaceDefaultImplementationsError) IsUserError ¶ added in v0.26.0
func (*MultipleInterfaceDefaultImplementationsError) IsUserError()
func (*MultipleInterfaceDefaultImplementationsError) StartPosition ¶ added in v0.26.0
func (e *MultipleInterfaceDefaultImplementationsError) StartPosition() ast.Position
type NominalType ¶ added in v0.11.0
type NominalType interface { Type MemberMap() *StringMemberOrderedMap }
supertype of interfaces and composites
type NonReferenceTypeReferenceError ¶
func (*NonReferenceTypeReferenceError) Error ¶
func (e *NonReferenceTypeReferenceError) Error() string
func (*NonReferenceTypeReferenceError) IsUserError ¶ added in v0.25.0
func (*NonReferenceTypeReferenceError) IsUserError()
func (*NonReferenceTypeReferenceError) SecondaryError ¶
func (e *NonReferenceTypeReferenceError) SecondaryError() string
type NonResourceTypeError ¶
func (*NonResourceTypeError) Error ¶
func (e *NonResourceTypeError) Error() string
func (*NonResourceTypeError) IsUserError ¶ added in v0.25.0
func (*NonResourceTypeError) IsUserError()
func (*NonResourceTypeError) SecondaryError ¶
func (e *NonResourceTypeError) SecondaryError() string
type NotCallableError ¶
func (*NotCallableError) Error ¶
func (e *NotCallableError) Error() string
func (*NotCallableError) IsUserError ¶ added in v0.25.0
func (*NotCallableError) IsUserError()
type NotDeclaredError ¶
type NotDeclaredError struct { ExpectedKind common.DeclarationKind Name string Expression *ast.IdentifierExpression Pos ast.Position }
func (*NotDeclaredError) EndPosition ¶
func (e *NotDeclaredError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*NotDeclaredError) Error ¶
func (e *NotDeclaredError) Error() string
func (*NotDeclaredError) IsUserError ¶ added in v0.25.0
func (*NotDeclaredError) IsUserError()
func (*NotDeclaredError) SecondaryError ¶
func (e *NotDeclaredError) SecondaryError() string
func (*NotDeclaredError) StartPosition ¶
func (e *NotDeclaredError) StartPosition() ast.Position
type NotDeclaredMemberError ¶
type NotDeclaredMemberError struct { Name string Type Type Expression *ast.MemberExpression ast.Range }
func (*NotDeclaredMemberError) Error ¶
func (e *NotDeclaredMemberError) Error() string
func (*NotDeclaredMemberError) IsUserError ¶ added in v0.25.0
func (*NotDeclaredMemberError) IsUserError()
func (*NotDeclaredMemberError) SecondaryError ¶
func (e *NotDeclaredMemberError) SecondaryError() string
type NotEquatableTypeError ¶
func (*NotEquatableTypeError) Error ¶
func (e *NotEquatableTypeError) Error() string
func (*NotEquatableTypeError) IsUserError ¶ added in v0.25.0
func (*NotEquatableTypeError) IsUserError()
type NotExportedError ¶
type NotExportedError struct { Name string ImportLocation common.Location Available []string Pos ast.Position }
func (*NotExportedError) EndPosition ¶
func (e *NotExportedError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*NotExportedError) Error ¶
func (e *NotExportedError) Error() string
func (*NotExportedError) IsUserError ¶ added in v0.25.0
func (*NotExportedError) IsUserError()
func (*NotExportedError) SecondaryError ¶ added in v0.8.0
func (e *NotExportedError) SecondaryError() string
func (*NotExportedError) StartPosition ¶
func (e *NotExportedError) StartPosition() ast.Position
type NotIndexableTypeError ¶
func (*NotIndexableTypeError) Error ¶
func (e *NotIndexableTypeError) Error() string
func (*NotIndexableTypeError) IsUserError ¶ added in v0.25.0
func (*NotIndexableTypeError) IsUserError()
type NotIndexingAssignableTypeError ¶ added in v0.7.0
func (*NotIndexingAssignableTypeError) Error ¶ added in v0.7.0
func (e *NotIndexingAssignableTypeError) Error() string
func (*NotIndexingAssignableTypeError) IsUserError ¶ added in v0.25.0
func (*NotIndexingAssignableTypeError) IsUserError()
type NumericType ¶ added in v0.15.0
type NumericType struct {
// contains filtered or unexported fields
}
NumericType represent all the types in the integer range and non-fractional ranged types.
func NewNumericType ¶ added in v0.15.0
func NewNumericType(typeName string) *NumericType
func (*NumericType) AsSuperType ¶ added in v0.24.0
func (t *NumericType) AsSuperType() *NumericType
func (*NumericType) Equal ¶ added in v0.15.0
func (t *NumericType) Equal(other Type) bool
func (*NumericType) GetMembers ¶ added in v0.15.0
func (t *NumericType) GetMembers() map[string]MemberResolver
func (*NumericType) ID ¶ added in v0.15.0
func (t *NumericType) ID() TypeID
func (*NumericType) IsEquatable ¶ added in v0.15.0
func (*NumericType) IsEquatable() bool
func (*NumericType) IsExternallyReturnable ¶ added in v0.15.0
func (*NumericType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*NumericType) IsImportable ¶ added in v0.17.0
func (t *NumericType) IsImportable(_ map[*Member]bool) bool
func (*NumericType) IsInvalidType ¶ added in v0.15.0
func (*NumericType) IsInvalidType() bool
func (*NumericType) IsResourceType ¶ added in v0.15.0
func (*NumericType) IsResourceType() bool
func (*NumericType) IsStorable ¶ added in v0.15.0
func (*NumericType) IsStorable(_ map[*Member]bool) bool
func (*NumericType) IsSuperType ¶ added in v0.24.0
func (t *NumericType) IsSuperType() bool
func (*NumericType) IsType ¶ added in v0.15.0
func (*NumericType) IsType()
func (*NumericType) MaxInt ¶ added in v0.15.0
func (t *NumericType) MaxInt() *big.Int
func (*NumericType) MinInt ¶ added in v0.15.0
func (t *NumericType) MinInt() *big.Int
func (*NumericType) QualifiedString ¶ added in v0.15.0
func (t *NumericType) QualifiedString() string
func (*NumericType) Resolve ¶ added in v0.15.0
func (t *NumericType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*NumericType) RewriteWithRestrictedTypes ¶ added in v0.15.0
func (t *NumericType) RewriteWithRestrictedTypes() (result Type, rewritten bool)
func (*NumericType) String ¶ added in v0.15.0
func (t *NumericType) String() string
func (*NumericType) SupportsSaturatingAdd ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingAdd() bool
func (*NumericType) SupportsSaturatingDivide ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingDivide() bool
func (*NumericType) SupportsSaturatingMultiply ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingMultiply() bool
func (*NumericType) SupportsSaturatingSubtract ¶ added in v0.15.0
func (t *NumericType) SupportsSaturatingSubtract() bool
func (*NumericType) Tag ¶ added in v0.24.0
func (t *NumericType) Tag() TypeTag
func (*NumericType) TypeAnnotationState ¶ added in v0.15.0
func (*NumericType) TypeAnnotationState() TypeAnnotationState
func (*NumericType) Unify ¶ added in v0.15.0
func (*NumericType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
func (*NumericType) WithIntRange ¶ added in v0.15.0
func (t *NumericType) WithIntRange(min *big.Int, max *big.Int) *NumericType
func (*NumericType) WithSaturatingAdd ¶ added in v0.15.0
func (t *NumericType) WithSaturatingAdd() *NumericType
func (*NumericType) WithSaturatingDivide ¶ added in v0.15.0
func (t *NumericType) WithSaturatingDivide() *NumericType
func (*NumericType) WithSaturatingMultiply ¶ added in v0.15.0
func (t *NumericType) WithSaturatingMultiply() *NumericType
func (*NumericType) WithSaturatingSubtract ¶ added in v0.15.0
func (t *NumericType) WithSaturatingSubtract() *NumericType
func (*NumericType) WithTag ¶ added in v0.24.0
func (t *NumericType) WithTag(tag TypeTag) *NumericType
type Occurrence ¶
type Occurrences ¶
type Occurrences struct {
// contains filtered or unexported fields
}
func NewOccurrences ¶
func NewOccurrences() *Occurrences
func (*Occurrences) All ¶
func (o *Occurrences) All() []Occurrence
func (*Occurrences) Find ¶
func (o *Occurrences) Find(pos Position) *Occurrence
func (*Occurrences) FindAll ¶ added in v0.17.0
func (o *Occurrences) FindAll(pos Position) []Occurrence
type OptionalType ¶
type OptionalType struct {
Type Type
}
OptionalType represents the optional variant of another type
func NewOptionalType ¶ added in v0.24.0
func NewOptionalType(memoryGauge common.MemoryGauge, typ Type) *OptionalType
func (*OptionalType) Equal ¶
func (t *OptionalType) Equal(other Type) bool
func (*OptionalType) GetMembers ¶ added in v0.7.0
func (t *OptionalType) GetMembers() map[string]MemberResolver
func (*OptionalType) ID ¶
func (t *OptionalType) ID() TypeID
func (*OptionalType) IsEquatable ¶ added in v0.7.0
func (t *OptionalType) IsEquatable() bool
func (*OptionalType) IsExternallyReturnable ¶ added in v0.11.0
func (t *OptionalType) IsExternallyReturnable(results map[*Member]bool) bool
func (*OptionalType) IsImportable ¶ added in v0.17.0
func (t *OptionalType) IsImportable(results map[*Member]bool) bool
func (*OptionalType) IsInvalidType ¶
func (t *OptionalType) IsInvalidType() bool
func (*OptionalType) IsResourceType ¶
func (t *OptionalType) IsResourceType() bool
func (*OptionalType) IsStorable ¶ added in v0.5.0
func (t *OptionalType) IsStorable(results map[*Member]bool) bool
func (*OptionalType) IsType ¶
func (*OptionalType) IsType()
func (*OptionalType) QualifiedString ¶
func (t *OptionalType) QualifiedString() string
func (*OptionalType) Resolve ¶
func (t *OptionalType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*OptionalType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *OptionalType) RewriteWithRestrictedTypes() (Type, bool)
func (*OptionalType) String ¶
func (t *OptionalType) String() string
func (*OptionalType) Tag ¶ added in v0.24.0
func (t *OptionalType) Tag() TypeTag
func (*OptionalType) TypeAnnotationState ¶
func (t *OptionalType) TypeAnnotationState() TypeAnnotationState
func (*OptionalType) Unify ¶
func (t *OptionalType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type Parameter ¶
type Parameter struct { Label string Identifier string TypeAnnotation *TypeAnnotation }
func (*Parameter) EffectiveArgumentLabel ¶
EffectiveArgumentLabel returns the effective argument label that an argument in a call must use: If no argument label is declared for parameter, the parameter name is used as the argument label
func (*Parameter) QualifiedString ¶
type ParameterizedType ¶ added in v0.5.0
type ParameterizedType interface { Type TypeParameters() []*TypeParameter Instantiate(typeArguments []Type, report func(err error)) Type BaseType() Type TypeArguments() []Type }
ParameterizedType is a type which might have type parameters
type Position ¶
type Position struct { // line number, starting at 1 Line int // column number, starting at 0 (byte count) Column int }
func ASTToSemaPosition ¶ added in v0.7.0
type PositionInfo ¶ added in v0.26.0
type PositionInfo struct { Occurrences *Occurrences VariableOrigins map[*Variable]*Origin MemberOrigins map[Type]map[string]*Origin MemberAccesses *MemberAccesses Ranges *Ranges FunctionInvocations *FunctionInvocations }
func NewPositionInfo ¶ added in v0.26.0
func NewPositionInfo() *PositionInfo
type PostConditionsRewrite ¶
type PostConditionsRewrite struct { BeforeStatements []ast.Statement RewrittenPostConditions ast.Conditions }
type PreviousResourceInvalidationNote ¶ added in v0.28.0
type PreviousResourceInvalidationNote struct { ResourceInvalidation ast.Range }
func (PreviousResourceInvalidationNote) Message ¶ added in v0.28.0
func (n PreviousResourceInvalidationNote) Message() string
type PurityCheckScope ¶ added in v0.32.0
type PurityError ¶ added in v0.32.0
func (*PurityError) Error ¶ added in v0.32.0
func (e *PurityError) Error() string
func (*PurityError) IsUserError ¶ added in v0.32.0
func (*PurityError) IsUserError()
type Range ¶ added in v0.16.0
type Range struct { Identifier string Type Type DeclarationKind common.DeclarationKind DocString string }
type ReadOnlyTargetAssignmentError ¶
func (*ReadOnlyTargetAssignmentError) Error ¶
func (e *ReadOnlyTargetAssignmentError) Error() string
func (*ReadOnlyTargetAssignmentError) IsUserError ¶ added in v0.25.0
func (*ReadOnlyTargetAssignmentError) IsUserError()
type RedeclarationError ¶
type RedeclarationError struct { Kind common.DeclarationKind Name string Pos ast.Position PreviousPos *ast.Position }
func (*RedeclarationError) EndPosition ¶
func (e *RedeclarationError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*RedeclarationError) Error ¶
func (e *RedeclarationError) Error() string
func (*RedeclarationError) ErrorNotes ¶
func (e *RedeclarationError) ErrorNotes() []errors.ErrorNote
func (*RedeclarationError) IsUserError ¶ added in v0.25.0
func (*RedeclarationError) IsUserError()
func (*RedeclarationError) StartPosition ¶
func (e *RedeclarationError) StartPosition() ast.Position
type RedeclarationNote ¶
func (RedeclarationNote) Message ¶
func (n RedeclarationNote) Message() string
type ReferenceType ¶
ReferenceType represents the reference to a value
func NewReferenceType ¶ added in v0.24.0
func NewReferenceType(memoryGauge common.MemoryGauge, typ Type, authorized bool) *ReferenceType
func (*ReferenceType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (t *ReferenceType) AllowsValueIndexingAssignment() bool
func (*ReferenceType) ElementType ¶
func (t *ReferenceType) ElementType(isAssignment bool) Type
func (*ReferenceType) Equal ¶
func (t *ReferenceType) Equal(other Type) bool
func (*ReferenceType) GetMembers ¶ added in v0.7.0
func (t *ReferenceType) GetMembers() map[string]MemberResolver
func (*ReferenceType) ID ¶
func (t *ReferenceType) ID() TypeID
func (*ReferenceType) IndexingType ¶
func (t *ReferenceType) IndexingType() Type
func (*ReferenceType) IsEquatable ¶ added in v0.7.0
func (*ReferenceType) IsEquatable() bool
func (*ReferenceType) IsExternallyReturnable ¶ added in v0.11.0
func (t *ReferenceType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*ReferenceType) IsImportable ¶ added in v0.17.0
func (t *ReferenceType) IsImportable(_ map[*Member]bool) bool
func (*ReferenceType) IsInvalidType ¶
func (t *ReferenceType) IsInvalidType() bool
func (*ReferenceType) IsResourceType ¶
func (t *ReferenceType) IsResourceType() bool
func (*ReferenceType) IsStorable ¶ added in v0.5.0
func (t *ReferenceType) IsStorable(_ map[*Member]bool) bool
func (*ReferenceType) IsType ¶
func (*ReferenceType) IsType()
func (*ReferenceType) QualifiedString ¶
func (t *ReferenceType) QualifiedString() string
func (*ReferenceType) Resolve ¶
func (t *ReferenceType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*ReferenceType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *ReferenceType) RewriteWithRestrictedTypes() (Type, bool)
func (*ReferenceType) String ¶
func (t *ReferenceType) String() string
func (*ReferenceType) Tag ¶ added in v0.24.0
func (t *ReferenceType) Tag() TypeTag
func (*ReferenceType) TypeAnnotationState ¶
func (*ReferenceType) TypeAnnotationState() TypeAnnotationState
func (*ReferenceType) Unify ¶
func (*ReferenceType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type ResolvedLocation ¶ added in v0.10.0
type ResolvedLocation struct { Location common.Location Identifiers []ast.Identifier }
type ResourceCapturingError ¶
func (*ResourceCapturingError) EndPosition ¶
func (e *ResourceCapturingError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*ResourceCapturingError) Error ¶
func (e *ResourceCapturingError) Error() string
func (*ResourceCapturingError) IsUserError ¶ added in v0.25.0
func (*ResourceCapturingError) IsUserError()
func (*ResourceCapturingError) StartPosition ¶
func (e *ResourceCapturingError) StartPosition() ast.Position
type ResourceFieldNotInvalidatedError ¶
func (*ResourceFieldNotInvalidatedError) EndPosition ¶
func (e *ResourceFieldNotInvalidatedError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*ResourceFieldNotInvalidatedError) Error ¶
func (e *ResourceFieldNotInvalidatedError) Error() string
func (*ResourceFieldNotInvalidatedError) IsUserError ¶ added in v0.25.0
func (*ResourceFieldNotInvalidatedError) IsUserError()
func (*ResourceFieldNotInvalidatedError) SecondaryError ¶
func (e *ResourceFieldNotInvalidatedError) SecondaryError() string
func (*ResourceFieldNotInvalidatedError) StartPosition ¶
func (e *ResourceFieldNotInvalidatedError) StartPosition() ast.Position
type ResourceInfo ¶
type ResourceInfo struct { Parent *ResourceInfo // contains filtered or unexported fields }
func (*ResourceInfo) Clone ¶ added in v0.13.0
func (ris *ResourceInfo) Clone() ResourceInfo
Clone returns a new child resource invalidation set that contains all entries of this parent set. Changes to the returned set will only be applied in the returned set, not the parent.
func (ResourceInfo) DefinitivelyInvalidated ¶
func (ris ResourceInfo) DefinitivelyInvalidated() bool
func (*ResourceInfo) DeleteLocally ¶ added in v0.28.0
func (ris *ResourceInfo) DeleteLocally(invalidation ResourceInvalidation)
DeleteLocally removes the given resource invalidation from this current set.
NOTE: the invalidation still might exist in a parent afterwards, i.e. call to Contains might still return true!
func (ResourceInfo) Invalidation ¶ added in v0.28.0
func (ris ResourceInfo) Invalidation() *ResourceInvalidation
func (*ResourceInfo) MaybeRecordInvalidation ¶ added in v0.28.0
func (ris *ResourceInfo) MaybeRecordInvalidation(invalidation ResourceInvalidation) ResourceInvalidation
MaybeRecordInvalidation records the given resource invalidation, if no invalidation has yet been recorded for the given resource.
type ResourceInvalidation ¶
type ResourceInvalidation struct { Kind ResourceInvalidationKind StartPos ast.Position EndPos ast.Position }
type ResourceInvalidationKind ¶
type ResourceInvalidationKind uint
const ( ResourceInvalidationKindUnknown ResourceInvalidationKind = iota ResourceInvalidationKindMoveDefinite ResourceInvalidationKindMovePotential ResourceInvalidationKindMoveTemporary ResourceInvalidationKindDestroyDefinite ResourceInvalidationKindDestroyPotential )
func (ResourceInvalidationKind) AsPotential ¶ added in v0.28.0
func (k ResourceInvalidationKind) AsPotential() ResourceInvalidationKind
func (ResourceInvalidationKind) CoarseNoun ¶ added in v0.28.0
func (i ResourceInvalidationKind) CoarseNoun() string
func (ResourceInvalidationKind) CoarsePassiveVerb ¶ added in v0.28.0
func (k ResourceInvalidationKind) CoarsePassiveVerb() string
func (ResourceInvalidationKind) DetailedNoun ¶ added in v0.28.0
func (k ResourceInvalidationKind) DetailedNoun() string
func (ResourceInvalidationKind) IsDefinite ¶ added in v0.5.0
func (k ResourceInvalidationKind) IsDefinite() bool
func (ResourceInvalidationKind) String ¶
func (i ResourceInvalidationKind) String() string
type ResourceLossError ¶
func (*ResourceLossError) Error ¶
func (e *ResourceLossError) Error() string
func (*ResourceLossError) IsUserError ¶ added in v0.25.0
func (*ResourceLossError) IsUserError()
type ResourceMethodBindingError ¶
func (*ResourceMethodBindingError) Error ¶
func (e *ResourceMethodBindingError) Error() string
func (*ResourceMethodBindingError) IsUserError ¶ added in v0.25.0
func (*ResourceMethodBindingError) IsUserError()
type ResourceUseAfterInvalidationError ¶
type ResourceUseAfterInvalidationError struct { Invalidation ResourceInvalidation ast.Range }
func (*ResourceUseAfterInvalidationError) Error ¶
func (e *ResourceUseAfterInvalidationError) Error() string
func (*ResourceUseAfterInvalidationError) ErrorNotes ¶
func (e *ResourceUseAfterInvalidationError) ErrorNotes() []errors.ErrorNote
func (*ResourceUseAfterInvalidationError) IsUserError ¶ added in v0.25.0
func (*ResourceUseAfterInvalidationError) IsUserError()
func (*ResourceUseAfterInvalidationError) SecondaryError ¶
func (e *ResourceUseAfterInvalidationError) SecondaryError() string
type Resources ¶
type Resources struct {
// contains filtered or unexported fields
}
Resources is a map which contains invalidation info for resources.
func NewResources ¶ added in v0.13.0
func NewResources() *Resources
func (*Resources) ForEach ¶ added in v0.10.6
func (ris *Resources) ForEach(f func(resource Resource, info ResourceInfo))
func (*Resources) Get ¶
func (ris *Resources) Get(resource Resource) ResourceInfo
func (*Resources) MaybeRecordInvalidation ¶ added in v0.28.0
func (ris *Resources) MaybeRecordInvalidation(resource Resource, invalidation ResourceInvalidation)
MaybeRecordInvalidation records the given resource invalidation, if no invalidation has yet been recorded for the given resource.
func (*Resources) MergeBranches ¶
func (ris *Resources) MergeBranches( thenResources *Resources, thenReturnInfo *ReturnInfo, elseResources *Resources, elseReturnInfo *ReturnInfo, )
MergeBranches merges the given resources from two branches into these resources. Invalidations occurring in both branches are considered definitive, other new invalidations are only considered potential. The else resources are optional.
func (*Resources) RemoveTemporaryMoveInvalidation ¶ added in v0.13.0
func (ris *Resources) RemoveTemporaryMoveInvalidation(resource Resource, invalidation ResourceInvalidation)
RemoveTemporaryMoveInvalidation removes the given invalidation from the set of invalidations for the given resource.
type RestrictedType ¶
type RestrictedType struct { Type Type Restrictions []*InterfaceType // contains filtered or unexported fields }
RestrictedType
No restrictions implies the type is fully restricted, i.e. no members of the underlying resource type are available.
func NewRestrictedType ¶ added in v0.24.0
func NewRestrictedType(memoryGauge common.MemoryGauge, typ Type, restrictions []*InterfaceType) *RestrictedType
func (*RestrictedType) Equal ¶
func (t *RestrictedType) Equal(other Type) bool
func (*RestrictedType) GetMembers ¶ added in v0.7.0
func (t *RestrictedType) GetMembers() map[string]MemberResolver
func (*RestrictedType) ID ¶
func (t *RestrictedType) ID() TypeID
func (*RestrictedType) IsEquatable ¶ added in v0.7.0
func (*RestrictedType) IsEquatable() bool
func (*RestrictedType) IsExternallyReturnable ¶ added in v0.11.0
func (t *RestrictedType) IsExternallyReturnable(results map[*Member]bool) bool
func (*RestrictedType) IsImportable ¶ added in v0.17.0
func (t *RestrictedType) IsImportable(results map[*Member]bool) bool
func (*RestrictedType) IsInvalidType ¶
func (t *RestrictedType) IsInvalidType() bool
func (*RestrictedType) IsResourceType ¶
func (t *RestrictedType) IsResourceType() bool
func (*RestrictedType) IsStorable ¶ added in v0.5.0
func (t *RestrictedType) IsStorable(results map[*Member]bool) bool
func (*RestrictedType) IsType ¶
func (*RestrictedType) IsType()
func (*RestrictedType) QualifiedString ¶
func (t *RestrictedType) QualifiedString() string
func (*RestrictedType) Resolve ¶
func (t *RestrictedType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*RestrictedType) RestrictionSet ¶
func (t *RestrictedType) RestrictionSet() *InterfaceSet
func (*RestrictedType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *RestrictedType) RewriteWithRestrictedTypes() (Type, bool)
func (*RestrictedType) String ¶
func (t *RestrictedType) String() string
func (*RestrictedType) Tag ¶ added in v0.24.0
func (t *RestrictedType) Tag() TypeTag
func (*RestrictedType) TypeAnnotationState ¶
func (*RestrictedType) TypeAnnotationState() TypeAnnotationState
func (*RestrictedType) Unify ¶
func (*RestrictedType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type RestrictionCompositeKindMismatchError ¶
type RestrictionCompositeKindMismatchError struct { CompositeKind common.CompositeKind PreviousCompositeKind common.CompositeKind ast.Range }
func (*RestrictionCompositeKindMismatchError) Error ¶
func (e *RestrictionCompositeKindMismatchError) Error() string
func (*RestrictionCompositeKindMismatchError) IsUserError ¶ added in v0.25.0
func (*RestrictionCompositeKindMismatchError) IsUserError()
type RestrictionMemberClashError ¶
type RestrictionMemberClashError struct { Name string RedeclaringType *InterfaceType OriginalDeclaringType *InterfaceType ast.Range }
func (*RestrictionMemberClashError) Error ¶
func (e *RestrictionMemberClashError) Error() string
func (*RestrictionMemberClashError) IsUserError ¶ added in v0.25.0
func (*RestrictionMemberClashError) IsUserError()
type ReturnInfo ¶
type ReturnInfo struct { // MaybeReturned indicates that (the branch of) the function // contains a potentially taken return statement MaybeReturned bool // JumpOffsets contains the offsets of all jumps // (break or continue statements), potential or definite. // // If non-empty, indicates that (the branch of) the function // contains a potential break or continue statement JumpOffsets *persistent.OrderedSet[int] // DefinitelyReturned indicates that (the branch of) the function // contains a definite return statement DefinitelyReturned bool // DefinitelyHalted indicates that (the branch of) the function // contains a definite halt (a function call with a Never return type) DefinitelyHalted bool // DefinitelyJumped indicates that (the branch of) the function // contains a definite break or continue statement DefinitelyJumped bool }
ReturnInfo tracks control-flow information
func NewReturnInfo ¶ added in v0.28.0
func NewReturnInfo() *ReturnInfo
func (*ReturnInfo) AddJumpOffset ¶ added in v0.28.0
func (ri *ReturnInfo) AddJumpOffset(offset int)
func (*ReturnInfo) Clone ¶
func (ri *ReturnInfo) Clone() *ReturnInfo
func (*ReturnInfo) IsUnreachable ¶ added in v0.21.0
func (ri *ReturnInfo) IsUnreachable() bool
func (*ReturnInfo) MaybeJumped ¶ added in v0.25.1
func (ri *ReturnInfo) MaybeJumped() bool
func (*ReturnInfo) MergeBranches ¶
func (ri *ReturnInfo) MergeBranches(thenReturnInfo *ReturnInfo, elseReturnInfo *ReturnInfo)
func (*ReturnInfo) MergePotentiallyUnevaluated ¶ added in v0.25.1
func (ri *ReturnInfo) MergePotentiallyUnevaluated(temporaryReturnInfo *ReturnInfo)
func (*ReturnInfo) WithNewJumpTarget ¶ added in v0.28.0
func (ri *ReturnInfo) WithNewJumpTarget(f func())
type ReturnStatementTypes ¶ added in v0.26.0
type RuntimeCastTypes ¶ added in v0.26.0
type RuntimeTypeConstructor ¶ added in v0.24.0
type RuntimeTypeConstructor struct { Name string Value *FunctionType DocString string }
type SaturatingArithmeticType ¶ added in v0.15.0
type SaturatingArithmeticType interface { Type SupportsSaturatingAdd() bool SupportsSaturatingSubtract() bool SupportsSaturatingMultiply() bool SupportsSaturatingDivide() bool }
SaturatingArithmeticType is a type that supports saturating arithmetic functions
type SemanticError ¶
type SemanticError interface { errors.UserError ast.HasPosition // contains filtered or unexported methods }
type SignatureAlgorithm ¶ added in v0.14.0
type SignatureAlgorithm uint8
const ( // Supported signing algorithms SignatureAlgorithmUnknown SignatureAlgorithm = iota SignatureAlgorithmECDSA_P256 SignatureAlgorithmECDSA_secp256k1 SignatureAlgorithmBLS_BLS12_381 )
func (SignatureAlgorithm) DocString ¶ added in v0.14.0
func (algo SignatureAlgorithm) DocString() string
func (SignatureAlgorithm) Name ¶ added in v0.14.0
func (algo SignatureAlgorithm) Name() string
Name returns the string representation of this signing algorithm.
func (SignatureAlgorithm) RawValue ¶ added in v0.14.0
func (algo SignatureAlgorithm) RawValue() uint8
func (SignatureAlgorithm) String ¶ added in v0.14.0
func (i SignatureAlgorithm) String() string
type SimpleType ¶ added in v0.13.5
type SimpleType struct { Name string QualifiedName string TypeID TypeID IsInvalid bool IsResource bool Storable bool Equatable bool ExternallyReturnable bool Importable bool IsSuperTypeOf func(subType Type) bool Members func(*SimpleType) map[string]MemberResolver NestedTypes *StringTypeOrderedMap ValueIndexingInfo ValueIndexingInfo // contains filtered or unexported fields }
SimpleType represents a simple nominal type.
func (*SimpleType) AllowsValueIndexingAssignment ¶ added in v0.13.5
func (t *SimpleType) AllowsValueIndexingAssignment() bool
func (*SimpleType) ElementType ¶ added in v0.13.5
func (t *SimpleType) ElementType(isAssignment bool) Type
func (*SimpleType) Equal ¶ added in v0.13.5
func (t *SimpleType) Equal(other Type) bool
func (*SimpleType) GetMembers ¶ added in v0.13.5
func (t *SimpleType) GetMembers() map[string]MemberResolver
func (*SimpleType) GetNestedTypes ¶ added in v0.13.5
func (t *SimpleType) GetNestedTypes() *StringTypeOrderedMap
func (*SimpleType) ID ¶ added in v0.13.5
func (t *SimpleType) ID() TypeID
func (*SimpleType) IndexingType ¶ added in v0.13.5
func (t *SimpleType) IndexingType() Type
func (*SimpleType) IsContainerType ¶ added in v0.20.3
func (t *SimpleType) IsContainerType() bool
func (*SimpleType) IsEquatable ¶ added in v0.13.5
func (t *SimpleType) IsEquatable() bool
func (*SimpleType) IsExternallyReturnable ¶ added in v0.13.5
func (t *SimpleType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*SimpleType) IsImportable ¶ added in v0.17.0
func (t *SimpleType) IsImportable(_ map[*Member]bool) bool
func (*SimpleType) IsInvalidType ¶ added in v0.13.5
func (t *SimpleType) IsInvalidType() bool
func (*SimpleType) IsResourceType ¶ added in v0.13.5
func (t *SimpleType) IsResourceType() bool
func (*SimpleType) IsStorable ¶ added in v0.13.5
func (t *SimpleType) IsStorable(_ map[*Member]bool) bool
func (*SimpleType) IsType ¶ added in v0.13.5
func (*SimpleType) IsType()
func (*SimpleType) QualifiedString ¶ added in v0.13.5
func (t *SimpleType) QualifiedString() string
func (*SimpleType) Resolve ¶ added in v0.13.5
func (t *SimpleType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*SimpleType) RewriteWithRestrictedTypes ¶ added in v0.13.5
func (t *SimpleType) RewriteWithRestrictedTypes() (Type, bool)
func (*SimpleType) String ¶ added in v0.13.5
func (t *SimpleType) String() string
func (*SimpleType) Tag ¶ added in v0.24.0
func (t *SimpleType) Tag() TypeTag
func (*SimpleType) TypeAnnotationState ¶ added in v0.13.5
func (*SimpleType) TypeAnnotationState() TypeAnnotationState
func (*SimpleType) Unify ¶ added in v0.13.5
func (*SimpleType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type SpecialFunctionDefaultImplementationError ¶ added in v0.26.0
type SpecialFunctionDefaultImplementationError struct { Container ast.Declaration Identifier *ast.Identifier KindName string }
SpecialFunctionDefaultImplementationError
func (*SpecialFunctionDefaultImplementationError) EndPosition ¶ added in v0.26.0
func (e *SpecialFunctionDefaultImplementationError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*SpecialFunctionDefaultImplementationError) Error ¶ added in v0.26.0
func (e *SpecialFunctionDefaultImplementationError) Error() string
func (*SpecialFunctionDefaultImplementationError) IsUserError ¶ added in v0.26.0
func (*SpecialFunctionDefaultImplementationError) IsUserError()
func (*SpecialFunctionDefaultImplementationError) StartPosition ¶ added in v0.26.0
func (e *SpecialFunctionDefaultImplementationError) StartPosition() ast.Position
type StringImportElementOrderedMap ¶ added in v0.13.0
type StringImportElementOrderedMap = orderedmap.OrderedMap[string, ImportElement]
type StringMemberOrderedMap ¶ added in v0.13.0
type StringMemberOrderedMap = orderedmap.OrderedMap[string, *Member]
func GetMembersAsMap ¶ added in v0.14.0
func GetMembersAsMap(members []*Member) *StringMemberOrderedMap
type StringTypeOrderedMap ¶ added in v0.13.0
type StringTypeOrderedMap = orderedmap.OrderedMap[string, Type]
type StringVariableOrderedMap ¶ added in v0.13.0
type StringVariableOrderedMap = orderedmap.OrderedMap[string, *Variable]
type SwapStatementTypes ¶ added in v0.26.0
type SwitchDefaultPositionError ¶ added in v0.10.0
func (*SwitchDefaultPositionError) Error ¶ added in v0.10.0
func (e *SwitchDefaultPositionError) Error() string
func (*SwitchDefaultPositionError) IsUserError ¶ added in v0.25.0
func (*SwitchDefaultPositionError) IsUserError()
type TransactionMissingPrepareError ¶
func (*TransactionMissingPrepareError) EndPosition ¶
func (e *TransactionMissingPrepareError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*TransactionMissingPrepareError) Error ¶
func (e *TransactionMissingPrepareError) Error() string
func (*TransactionMissingPrepareError) IsUserError ¶ added in v0.25.0
func (*TransactionMissingPrepareError) IsUserError()
func (*TransactionMissingPrepareError) StartPosition ¶
func (e *TransactionMissingPrepareError) StartPosition() ast.Position
type TransactionType ¶
type TransactionType struct { Members *StringMemberOrderedMap Fields []string PrepareParameters []*Parameter Parameters []*Parameter }
func (*TransactionType) EntryPointFunctionType ¶
func (t *TransactionType) EntryPointFunctionType() *FunctionType
func (*TransactionType) Equal ¶
func (*TransactionType) Equal(other Type) bool
func (*TransactionType) ExecuteFunctionType ¶
func (*TransactionType) ExecuteFunctionType() *FunctionType
func (*TransactionType) GetMembers ¶ added in v0.7.0
func (t *TransactionType) GetMembers() map[string]MemberResolver
func (*TransactionType) ID ¶
func (*TransactionType) ID() TypeID
func (*TransactionType) IsEquatable ¶ added in v0.7.0
func (*TransactionType) IsEquatable() bool
func (*TransactionType) IsExternallyReturnable ¶ added in v0.11.0
func (*TransactionType) IsExternallyReturnable(_ map[*Member]bool) bool
func (*TransactionType) IsImportable ¶ added in v0.17.0
func (t *TransactionType) IsImportable(_ map[*Member]bool) bool
func (*TransactionType) IsInvalidType ¶
func (*TransactionType) IsInvalidType() bool
func (*TransactionType) IsResourceType ¶
func (*TransactionType) IsResourceType() bool
func (*TransactionType) IsStorable ¶ added in v0.5.0
func (*TransactionType) IsStorable(_ map[*Member]bool) bool
func (*TransactionType) IsType ¶
func (*TransactionType) IsType()
func (*TransactionType) PrepareFunctionType ¶
func (t *TransactionType) PrepareFunctionType() *FunctionType
func (*TransactionType) QualifiedString ¶
func (*TransactionType) QualifiedString() string
func (*TransactionType) Resolve ¶
func (t *TransactionType) Resolve(_ *TypeParameterTypeOrderedMap) Type
func (*TransactionType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *TransactionType) RewriteWithRestrictedTypes() (Type, bool)
func (*TransactionType) String ¶
func (*TransactionType) String() string
func (*TransactionType) Tag ¶ added in v0.24.0
func (t *TransactionType) Tag() TypeTag
func (*TransactionType) TypeAnnotationState ¶
func (*TransactionType) TypeAnnotationState() TypeAnnotationState
func (*TransactionType) Unify ¶
func (*TransactionType) Unify(_ Type, _ *TypeParameterTypeOrderedMap, _ func(err error), _ ast.Range) bool
type Type ¶
type Type interface { IsType() ID() TypeID Tag() TypeTag String() string QualifiedString() string Equal(other Type) bool // IsResourceType returns true if the type is itself a resource (a `CompositeType` with resource kind), // or it contains a resource type (e.g. for optionals, arrays, dictionaries, etc.) IsResourceType() bool // IsInvalidType returns true if the type is itself the invalid type (see `InvalidType`), // or it contains an invalid type (e.g. for optionals, arrays, dictionaries, etc.) IsInvalidType() bool // IsStorable returns true if the type is allowed to be a stored, // e.g. in a field of a composite type. // // The check if the type is storable is recursive, // the results parameter prevents cycles: // it is checked at the start of the recursively called function, // and pre-set before a recursive call. IsStorable(results map[*Member]bool) bool // IsExternallyReturnable returns true if a value of this type can be exported // // The check if the type is externally returnable is recursive, // the results parameter prevents cycles: // it is checked at the start of the recursively called function, // and pre-set before a recursive call. IsExternallyReturnable(results map[*Member]bool) bool // IsImportable returns true if values of the type can be imported to a program as arguments IsImportable(results map[*Member]bool) bool // IsEquatable returns true if values of the type can be equated IsEquatable() bool TypeAnnotationState() TypeAnnotationState RewriteWithRestrictedTypes() (result Type, rewritten bool) // Unify attempts to unify the given type with this type, i.e., resolve type parameters // in generic types (see `GenericType`) using the given type parameters. // // For a generic type, unification assigns a given type with a type parameter. // // If the type parameter has not been previously unified with a type, // through an explicitly provided type argument in an invocation // or through a previous unification, the type parameter is assigned the given type. // // If the type parameter has already been previously unified with a type, // the type parameter's unified . // // The boolean return value indicates if a generic type was encountered during unification. // For primitives (e.g. `Int`, `String`, etc.) it would be false, as . // For types with nested types (e.g. optionals, arrays, and dictionaries) // the result is the successful unification of the inner types. // // The boolean return value does *not* indicate if unification succeeded or not. // Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool // Resolve returns a type that is free of generic types (see `GenericType`), // i.e. it resolves the type parameters in generic types given the type parameter // unifications of `typeParameters`. // // If resolution fails, it returns `nil`. // Resolve(typeArguments *TypeParameterTypeOrderedMap) Type GetMembers() map[string]MemberResolver }
func CheckPathLiteral ¶ added in v0.12.0
func CheckRestrictedType ¶ added in v0.24.0
func CheckRestrictedType( memoryGauge common.MemoryGauge, restrictedType Type, restrictions []*InterfaceType, report func(func(*ast.RestrictedType) error), ) Type
func LeastCommonSuperType ¶ added in v0.24.0
func UnwrapOptionalType ¶
UnwrapOptionalType returns the type if it is not an optional type, or the inner-most type if it is (optional types are repeatedly unwrapped)
type TypeAnnotation ¶
func NewTypeAnnotation ¶
func NewTypeAnnotation(ty Type) *TypeAnnotation
func (*TypeAnnotation) Equal ¶
func (a *TypeAnnotation) Equal(other *TypeAnnotation) bool
func (*TypeAnnotation) QualifiedString ¶
func (a *TypeAnnotation) QualifiedString() string
func (*TypeAnnotation) String ¶
func (a *TypeAnnotation) String() string
func (*TypeAnnotation) TypeAnnotationState ¶
func (a *TypeAnnotation) TypeAnnotationState() TypeAnnotationState
type TypeAnnotationRequiredError ¶ added in v0.9.0
func (*TypeAnnotationRequiredError) EndPosition ¶ added in v0.9.0
func (e *TypeAnnotationRequiredError) EndPosition(common.MemoryGauge) ast.Position
func (*TypeAnnotationRequiredError) Error ¶ added in v0.9.0
func (e *TypeAnnotationRequiredError) Error() string
func (*TypeAnnotationRequiredError) IsUserError ¶ added in v0.25.0
func (*TypeAnnotationRequiredError) IsUserError()
func (*TypeAnnotationRequiredError) StartPosition ¶ added in v0.9.0
func (e *TypeAnnotationRequiredError) StartPosition() ast.Position
type TypeAnnotationState ¶
type TypeAnnotationState uint
const ( TypeAnnotationStateUnknown TypeAnnotationState = iota TypeAnnotationStateValid TypeAnnotationStateInvalidResourceAnnotation TypeAnnotationStateMissingResourceAnnotation )
func (TypeAnnotationState) String ¶
func (i TypeAnnotationState) String() string
type TypeCheckFunc ¶
type TypeCheckFunc = func() Type
type TypeDeclaration ¶
type TypeMismatchError ¶
type TypeMismatchError struct { ExpectedType Type ActualType Type Expression ast.Expression ast.Range }
func (*TypeMismatchError) Error ¶
func (e *TypeMismatchError) Error() string
func (*TypeMismatchError) IsUserError ¶ added in v0.25.0
func (*TypeMismatchError) IsUserError()
func (*TypeMismatchError) SecondaryError ¶
func (e *TypeMismatchError) SecondaryError() string
type TypeMismatchWithDescriptionError ¶
type TypeMismatchWithDescriptionError struct { ExpectedTypeDescription string ActualType Type ast.Range }
func (*TypeMismatchWithDescriptionError) Error ¶
func (e *TypeMismatchWithDescriptionError) Error() string
func (*TypeMismatchWithDescriptionError) IsUserError ¶ added in v0.25.0
func (*TypeMismatchWithDescriptionError) IsUserError()
func (*TypeMismatchWithDescriptionError) SecondaryError ¶
func (e *TypeMismatchWithDescriptionError) SecondaryError() string
type TypeParameter ¶
func (TypeParameter) Equal ¶
func (p TypeParameter) Equal(other *TypeParameter) bool
func (TypeParameter) QualifiedString ¶
func (p TypeParameter) QualifiedString() string
func (TypeParameter) String ¶
func (p TypeParameter) String() string
type TypeParameterTypeInferenceError ¶
func (*TypeParameterTypeInferenceError) Error ¶
func (e *TypeParameterTypeInferenceError) Error() string
func (*TypeParameterTypeInferenceError) IsUserError ¶ added in v0.25.0
func (*TypeParameterTypeInferenceError) IsUserError()
type TypeParameterTypeMismatchError ¶
type TypeParameterTypeMismatchError struct { TypeParameter *TypeParameter ExpectedType Type ActualType Type ast.Range }
func (*TypeParameterTypeMismatchError) Error ¶
func (e *TypeParameterTypeMismatchError) Error() string
func (*TypeParameterTypeMismatchError) IsUserError ¶ added in v0.25.0
func (*TypeParameterTypeMismatchError) IsUserError()
func (*TypeParameterTypeMismatchError) SecondaryError ¶
func (e *TypeParameterTypeMismatchError) SecondaryError() string
type TypeParameterTypeOrderedMap ¶ added in v0.13.0
type TypeParameterTypeOrderedMap = orderedmap.OrderedMap[*TypeParameter, Type]
type TypeTag ¶ added in v0.24.0
type TypeTag struct {
// contains filtered or unexported fields
}
TypeTag is a bitmask representation for types. Each type has a unique dedicated bit/bit-pattern in the bitmask. The mask consist of two sections: `lowerMask` and the `upperMask`. Each section can represent 64-types.
func (TypeTag) ContainsAny ¶ added in v0.24.0
type UninitializedFieldAccessError ¶
func (*UninitializedFieldAccessError) EndPosition ¶
func (e *UninitializedFieldAccessError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*UninitializedFieldAccessError) Error ¶
func (e *UninitializedFieldAccessError) Error() string
func (*UninitializedFieldAccessError) IsUserError ¶ added in v0.25.0
func (*UninitializedFieldAccessError) IsUserError()
func (*UninitializedFieldAccessError) StartPosition ¶
func (e *UninitializedFieldAccessError) StartPosition() ast.Position
type UninitializedUseError ¶
func (*UninitializedUseError) EndPosition ¶
func (e *UninitializedUseError) EndPosition(memoryGauge common.MemoryGauge) ast.Position
func (*UninitializedUseError) Error ¶
func (e *UninitializedUseError) Error() string
func (*UninitializedUseError) IsUserError ¶ added in v0.25.0
func (*UninitializedUseError) IsUserError()
func (*UninitializedUseError) StartPosition ¶
func (e *UninitializedUseError) StartPosition() ast.Position
type UnknownSpecialFunctionError ¶
func (*UnknownSpecialFunctionError) EndPosition ¶
func (e *UnknownSpecialFunctionError) EndPosition(common.MemoryGauge) ast.Position
func (*UnknownSpecialFunctionError) Error ¶
func (e *UnknownSpecialFunctionError) Error() string
func (*UnknownSpecialFunctionError) IsUserError ¶ added in v0.25.0
func (*UnknownSpecialFunctionError) IsUserError()
func (*UnknownSpecialFunctionError) StartPosition ¶
func (e *UnknownSpecialFunctionError) StartPosition() ast.Position
type UnparameterizedTypeInstantiationError ¶ added in v0.5.0
func (*UnparameterizedTypeInstantiationError) Error ¶ added in v0.5.0
func (e *UnparameterizedTypeInstantiationError) Error() string
func (*UnparameterizedTypeInstantiationError) IsUserError ¶ added in v0.25.0
func (*UnparameterizedTypeInstantiationError) IsUserError()
func (*UnparameterizedTypeInstantiationError) SecondaryError ¶ added in v0.5.0
func (e *UnparameterizedTypeInstantiationError) SecondaryError() string
type UnreachableStatementError ¶
func (*UnreachableStatementError) Error ¶
func (e *UnreachableStatementError) Error() string
func (*UnreachableStatementError) IsUserError ¶ added in v0.25.0
func (*UnreachableStatementError) IsUserError()
type UnresolvedImportError ¶
func (*UnresolvedImportError) Error ¶
func (e *UnresolvedImportError) Error() string
func (*UnresolvedImportError) IsUserError ¶ added in v0.25.0
func (*UnresolvedImportError) IsUserError()
type UnsupportedOptionalChainingAssignmentError ¶
func (*UnsupportedOptionalChainingAssignmentError) Error ¶
func (e *UnsupportedOptionalChainingAssignmentError) Error() string
func (*UnsupportedOptionalChainingAssignmentError) IsUserError ¶ added in v0.25.0
func (*UnsupportedOptionalChainingAssignmentError) IsUserError()
type UnsupportedOverloadingError ¶
type UnsupportedOverloadingError struct { DeclarationKind common.DeclarationKind ast.Range }
func (*UnsupportedOverloadingError) Error ¶
func (e *UnsupportedOverloadingError) Error() string
func (*UnsupportedOverloadingError) IsUserError ¶ added in v0.25.0
func (*UnsupportedOverloadingError) IsUserError()
type UnsupportedResourceForLoopError ¶
func (*UnsupportedResourceForLoopError) Error ¶
func (e *UnsupportedResourceForLoopError) Error() string
func (*UnsupportedResourceForLoopError) IsUserError ¶ added in v0.25.0
func (*UnsupportedResourceForLoopError) IsUserError()
type ValidTopLevelDeclarationsHandlerFunc ¶ added in v0.5.0
type ValidTopLevelDeclarationsHandlerFunc = func(common.Location) []common.DeclarationKind
type ValueDeclaration ¶
type ValueIndexableType ¶
type ValueIndexableType interface { Type AllowsValueIndexingAssignment() bool ElementType(isAssignment bool) Type IndexingType() Type // contains filtered or unexported methods }
ValueIndexableType is a type which can be indexed into using a value
type ValueIndexingInfo ¶ added in v0.13.2
type ValueIndexingInfo struct { IsValueIndexableType bool AllowsValueIndexingAssignment bool ElementType func(_ bool) Type IndexingType *NumericType }
type Variable ¶
type Variable struct { Identifier string DeclarationKind common.DeclarationKind // Type is the type of the variable Type Type // Access is the access modifier Access ast.Access // IsConstant indicates if the variable is read-only IsConstant bool // ActivationDepth is the depth of scopes in which the variable was declared ActivationDepth int // ArgumentLabels are the argument labels that must be used in an invocation of the variable ArgumentLabels []string // Pos is the position where the variable was declared Pos *ast.Position // DocString is the optional docstring DocString string // contains filtered or unexported fields }
type VariableActivation ¶ added in v0.14.0
type VariableActivation struct { Depth int Parent *VariableActivation LeaveCallbacks []func(EndPositionGetter) // contains filtered or unexported fields }
An VariableActivation is a map of strings to variables. It is used to represent an active scope in a program, i.e. it is used as a symbol table during semantic analysis.
func NewVariableActivation ¶ added in v0.14.0
func NewVariableActivation(parent *VariableActivation) *VariableActivation
NewVariableActivation returns as new activation with the given parent. The parent may be nil.
func (*VariableActivation) Clear ¶ added in v0.14.1
func (a *VariableActivation) Clear()
Clear removes all variables from this activation.
func (*VariableActivation) DeclareType ¶ added in v0.26.0
func (a *VariableActivation) DeclareType(declaration TypeDeclaration)
func (*VariableActivation) DeclareValue ¶ added in v0.26.0
func (a *VariableActivation) DeclareValue(declaration ValueDeclaration)
func (*VariableActivation) Find ¶ added in v0.14.0
func (a *VariableActivation) Find(name string) *Variable
Find returns the variable for a given name in the activation. It returns nil if no variable is found.
func (*VariableActivation) ForEach ¶ added in v0.14.0
func (a *VariableActivation) ForEach(cb func(string, *Variable) error) error
ForEach calls the given function for each name-variable pair in the activation. It can be used to iterate over all entries of the activation.
func (*VariableActivation) Set ¶ added in v0.14.0
func (a *VariableActivation) Set(name string, variable *Variable)
Set sets the given variable.
func (*VariableActivation) SetParent ¶ added in v0.14.1
func (a *VariableActivation) SetParent(parent *VariableActivation)
SetParent sets the parent of this activation to the given parent and updates the depth.
type VariableActivations ¶
type VariableActivations struct {
// contains filtered or unexported fields
}
VariableActivations is a stack of activation records. Each entry represents a new activation record.
The current / most nested activation record can be found at the top of the stack (see function `Current`).
func NewVariableActivations ¶ added in v0.14.1
func NewVariableActivations(parent *VariableActivation) *VariableActivations
func (*VariableActivations) Current ¶ added in v0.13.3
func (a *VariableActivations) Current() *VariableActivation
Current returns the current / most nested activation, which can be found at the top of the stack. It returns nil if there is no active activation.
func (*VariableActivations) DeclareValue ¶ added in v0.27.0
func (a *VariableActivations) DeclareValue(declaration ValueDeclaration) (*Variable, error)
func (*VariableActivations) Depth ¶
func (a *VariableActivations) Depth() int
Depth returns the depth (size) of the activation stack.
func (*VariableActivations) Enter ¶
func (a *VariableActivations) Enter()
Enter pushes a new empty activation to the top of the activation stack. The new activation has the current activation as its parent.
func (*VariableActivations) Find ¶
func (a *VariableActivations) Find(name string) *Variable
Find returns the variable for a given name in the current activation. It returns nil if no variable is found or if there is no current activation.
func (*VariableActivations) ForEachVariableDeclaredInAndBelow ¶ added in v0.16.0
func (a *VariableActivations) ForEachVariableDeclaredInAndBelow(depth int, f func(name string, value *Variable))
func (*VariableActivations) Leave ¶
func (a *VariableActivations) Leave(getEndPosition func(common.MemoryGauge) ast.Position)
Leave pops the top-most (current) activation from the top of the activation stack.
func (*VariableActivations) Set ¶
func (a *VariableActivations) Set(name string, variable *Variable)
Set sets the variable in the current activation.
type VariableDeclarationTypes ¶ added in v0.26.0
type VariableSizedType ¶
type VariableSizedType struct { Type Type // contains filtered or unexported fields }
VariableSizedType is a variable sized array type
func NewVariableSizedType ¶ added in v0.24.0
func NewVariableSizedType(memoryGauge common.MemoryGauge, typ Type) *VariableSizedType
func (*VariableSizedType) AllowsValueIndexingAssignment ¶ added in v0.7.0
func (*VariableSizedType) AllowsValueIndexingAssignment() bool
func (*VariableSizedType) ElementType ¶
func (t *VariableSizedType) ElementType(_ bool) Type
func (*VariableSizedType) Equal ¶
func (t *VariableSizedType) Equal(other Type) bool
func (*VariableSizedType) GetMembers ¶ added in v0.7.0
func (t *VariableSizedType) GetMembers() map[string]MemberResolver
func (*VariableSizedType) ID ¶
func (t *VariableSizedType) ID() TypeID
func (*VariableSizedType) IndexingType ¶
func (t *VariableSizedType) IndexingType() Type
func (*VariableSizedType) IsEquatable ¶ added in v0.7.0
func (*VariableSizedType) IsEquatable() bool
func (*VariableSizedType) IsExternallyReturnable ¶ added in v0.11.0
func (t *VariableSizedType) IsExternallyReturnable(results map[*Member]bool) bool
func (*VariableSizedType) IsImportable ¶ added in v0.17.0
func (t *VariableSizedType) IsImportable(results map[*Member]bool) bool
func (*VariableSizedType) IsInvalidType ¶
func (t *VariableSizedType) IsInvalidType() bool
func (*VariableSizedType) IsResourceType ¶
func (t *VariableSizedType) IsResourceType() bool
func (*VariableSizedType) IsStorable ¶ added in v0.5.0
func (t *VariableSizedType) IsStorable(results map[*Member]bool) bool
func (*VariableSizedType) IsType ¶
func (*VariableSizedType) IsType()
func (*VariableSizedType) QualifiedString ¶
func (t *VariableSizedType) QualifiedString() string
func (*VariableSizedType) Resolve ¶
func (t *VariableSizedType) Resolve(typeArguments *TypeParameterTypeOrderedMap) Type
func (*VariableSizedType) RewriteWithRestrictedTypes ¶ added in v0.8.0
func (t *VariableSizedType) RewriteWithRestrictedTypes() (Type, bool)
func (*VariableSizedType) String ¶
func (t *VariableSizedType) String() string
func (*VariableSizedType) Tag ¶ added in v0.24.0
func (t *VariableSizedType) Tag() TypeTag
func (*VariableSizedType) TypeAnnotationState ¶
func (t *VariableSizedType) TypeAnnotationState() TypeAnnotationState
func (*VariableSizedType) Unify ¶
func (t *VariableSizedType) Unify( other Type, typeParameters *TypeParameterTypeOrderedMap, report func(err error), outerRange ast.Range, ) bool
type VirtualImport ¶ added in v0.5.0
type VirtualImport struct { ValueElements *StringImportElementOrderedMap TypeElements *StringImportElementOrderedMap }
func (VirtualImport) AllTypeElements ¶ added in v0.5.0
func (i VirtualImport) AllTypeElements() *StringImportElementOrderedMap
func (VirtualImport) AllValueElements ¶ added in v0.5.0
func (i VirtualImport) AllValueElements() *StringImportElementOrderedMap
func (VirtualImport) IsChecking ¶ added in v0.10.0
func (VirtualImport) IsChecking() bool
Source Files ¶
- accesscheckmode.go
- accesscheckmode_string.go
- any_type.go
- anyresource_type.go
- anystruct_type.go
- authaccount_contracts.go
- authaccount_type.go
- before_extractor.go
- binaryoperationkind.go
- binaryoperationkind_string.go
- block.go
- bool_type.go
- character_type.go
- check_array_expression.go
- check_assignment.go
- check_binary_expression.go
- check_block.go
- check_casting_expression.go
- check_composite_declaration.go
- check_conditional.go
- check_conditions.go
- check_create_expression.go
- check_destroy_expression.go
- check_dictionary_expression.go
- check_emit_statement.go
- check_event_declaration.go
- check_expression.go
- check_for.go
- check_force_expression.go
- check_function.go
- check_import_declaration.go
- check_interface_declaration.go
- check_invocation_expression.go
- check_member_expression.go
- check_path_expression.go
- check_pragma.go
- check_reference_expression.go
- check_return_statement.go
- check_swap.go
- check_switch.go
- check_transaction_declaration.go
- check_unary_expression.go
- check_variable_declaration.go
- check_while.go
- checker.go
- config.go
- containerkind.go
- containerkind_string.go
- crypto_algorithm_types.go
- declarations.go
- deployed_contract.go
- elaboration.go
- entrypoint.go
- errors.go
- function_activations.go
- function_invocations.go
- hashalgorithm_string.go
- import.go
- initialization_info.go
- interfaceset.go
- invalid_type.go
- member_accesses.go
- meta_type.go
- never_type.go
- occurrences.go
- orderdmaps.go
- path_type.go
- positioninfo.go
- post_conditions_rewrite.go
- public_account_contracts.go
- publicaccount_type.go
- ranges.go
- resolve.go
- resource_invalidation.go
- resourceinfo.go
- resourceinvalidationkind.go
- resourceinvalidationkind_string.go
- resources.go
- return_info.go
- runtime_type_constructors.go
- signaturealgorithm_string.go
- simple_type.go
- storable_type.go
- string_type.go
- type.go
- type_names.go
- type_tags.go
- typeannotationstate.go
- typeannotationstate_string.go
- typecheckfunc.go
- variable.go
- variable_activations.go
- void_type.go