Documentation ¶
Index ¶
- Constants
- Variables
- func AreCompatibleEquatableTypes(leftType, rightType Type) bool
- func FailableCastCanSucceed(subType, superType Type) bool
- func IsConcatenatableType(ty Type) bool
- func IsEquatableType(ty Type) bool
- func IsNilType(ty Type) bool
- func IsSubType(subType Type, superType Type) bool
- func IsValidDictionaryKeyType(keyType Type) bool
- func VisitContainerAndNested(t ContainerType, visit func(ty Type))
- type AccessCheckMode
- type AddressType
- func (*AddressType) ContainsFirstLevelInterfaceType() bool
- func (*AddressType) Equal(other Type) bool
- func (*AddressType) ID() TypeID
- func (*AddressType) IsInvalidType() bool
- func (*AddressType) IsResourceType() bool
- func (*AddressType) IsType()
- func (*AddressType) MaxInt() *big.Int
- func (*AddressType) MinInt() *big.Int
- func (*AddressType) QualifiedString() string
- func (t *AddressType) Resolve(_ map[*TypeParameter]Type) Type
- func (*AddressType) String() string
- func (*AddressType) TypeAnnotationState() TypeAnnotationState
- func (*AddressType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type AlwaysFailingNonResourceCastingTypeError
- type AlwaysFailingResourceCastingTypeError
- type AmbiguousRestrictedTypeError
- type AnyResourceType
- func (*AnyResourceType) ContainsFirstLevelInterfaceType() bool
- func (*AnyResourceType) Equal(other Type) bool
- func (*AnyResourceType) ID() TypeID
- func (*AnyResourceType) IsInvalidType() bool
- func (*AnyResourceType) IsResourceType() bool
- func (*AnyResourceType) IsType()
- func (*AnyResourceType) QualifiedString() string
- func (t *AnyResourceType) Resolve(_ map[*TypeParameter]Type) Type
- func (*AnyResourceType) String() string
- func (*AnyResourceType) TypeAnnotationState() TypeAnnotationState
- func (*AnyResourceType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type AnyStructType
- func (*AnyStructType) ContainsFirstLevelInterfaceType() bool
- func (*AnyStructType) Equal(other Type) bool
- func (*AnyStructType) ID() TypeID
- func (*AnyStructType) IsInvalidType() bool
- func (*AnyStructType) IsResourceType() bool
- func (*AnyStructType) IsType()
- func (*AnyStructType) QualifiedString() string
- func (t *AnyStructType) Resolve(_ map[*TypeParameter]Type) Type
- func (*AnyStructType) String() string
- func (*AnyStructType) TypeAnnotationState() TypeAnnotationState
- func (*AnyStructType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type AnyType
- func (*AnyType) ContainsFirstLevelInterfaceType() bool
- func (*AnyType) Equal(other Type) bool
- func (*AnyType) ID() TypeID
- func (*AnyType) IsInvalidType() bool
- func (*AnyType) IsResourceType() bool
- func (*AnyType) IsType()
- func (*AnyType) QualifiedString() string
- func (t *AnyType) Resolve(_ map[*TypeParameter]Type) Type
- func (*AnyType) String() string
- func (*AnyType) TypeAnnotationState() TypeAnnotationState
- func (*AnyType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type ArgumentCountError
- type ArrayType
- type AssignmentToConstantError
- type AssignmentToConstantMemberError
- type AuthAccountType
- func (*AuthAccountType) CanHaveMembers() bool
- func (*AuthAccountType) ContainsFirstLevelInterfaceType() bool
- func (*AuthAccountType) Equal(other Type) bool
- func (t *AuthAccountType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (*AuthAccountType) ID() TypeID
- func (*AuthAccountType) IsInvalidType() bool
- func (*AuthAccountType) IsResourceType() bool
- func (*AuthAccountType) IsType()
- func (*AuthAccountType) QualifiedString() string
- func (t *AuthAccountType) Resolve(_ map[*TypeParameter]Type) Type
- func (*AuthAccountType) String() string
- func (*AuthAccountType) TypeAnnotationState() TypeAnnotationState
- func (*AuthAccountType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- 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 BinaryOperationKind
- type BoolType
- func (*BoolType) ContainsFirstLevelInterfaceType() bool
- func (*BoolType) Equal(other Type) bool
- func (*BoolType) ID() TypeID
- func (*BoolType) IsInvalidType() bool
- func (*BoolType) IsResourceType() bool
- func (*BoolType) IsType()
- func (*BoolType) QualifiedString() string
- func (t *BoolType) Resolve(_ map[*TypeParameter]Type) Type
- func (*BoolType) String() string
- func (*BoolType) TypeAnnotationState() TypeAnnotationState
- func (*BoolType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type BranchesResourceInfo
- type BranchesResourceInfos
- type CapabilityType
- func (t *CapabilityType) CanHaveMembers() bool
- func (*CapabilityType) ContainsFirstLevelInterfaceType() bool
- func (*CapabilityType) Equal(other Type) bool
- func (t *CapabilityType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (*CapabilityType) ID() TypeID
- func (*CapabilityType) IsInvalidType() bool
- func (*CapabilityType) IsResourceType() bool
- func (*CapabilityType) IsType()
- func (*CapabilityType) QualifiedString() string
- func (t *CapabilityType) Resolve(_ map[*TypeParameter]Type) Type
- func (*CapabilityType) String() string
- func (*CapabilityType) TypeAnnotationState() TypeAnnotationState
- func (*CapabilityType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type CharacterType
- func (*CharacterType) ContainsFirstLevelInterfaceType() bool
- func (*CharacterType) Equal(other Type) bool
- func (*CharacterType) ID() TypeID
- func (*CharacterType) IsInvalidType() bool
- func (*CharacterType) IsResourceType() bool
- func (*CharacterType) IsType()
- func (*CharacterType) QualifiedString() string
- func (t *CharacterType) Resolve(_ map[*TypeParameter]Type) Type
- func (*CharacterType) String() string
- func (*CharacterType) TypeAnnotationState() TypeAnnotationState
- func (*CharacterType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type CheckHandlerFunc
- type CheckedFunctionType
- type Checker
- func (checker *Checker) Check() error
- func (checker *Checker) CheckerError() *CheckerError
- func (checker *Checker) ConvertType(t ast.Type) Type
- func (checker *Checker) ConvertTypeAnnotation(typeAnnotation *ast.TypeAnnotation) *TypeAnnotation
- func (checker *Checker) EnsureLoaded(location ast.Location, loadProgram func() *ast.Program) (*Checker, *CheckerError)
- func (checker *Checker) FindType(name string) Type
- func (checker *Checker) IsChecked() bool
- func (checker *Checker) ResetErrors()
- func (checker *Checker) SetAllCheckers(allCheckers map[ast.LocationID]*Checker)
- func (checker *Checker) TypeActivationDepth() int
- func (checker *Checker) UserDefinedValues() map[string]*Variable
- func (checker *Checker) ValueActivationDepth() int
- func (checker *Checker) VisitArrayExpression(expression *ast.ArrayExpression) ast.Repr
- func (checker *Checker) VisitAssignmentStatement(assignment *ast.AssignmentStatement) ast.Repr
- func (checker *Checker) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr
- func (checker *Checker) VisitBlock(block *ast.Block) ast.Repr
- func (checker *Checker) VisitBoolExpression(_ *ast.BoolExpression) ast.Repr
- func (checker *Checker) VisitBreakStatement(statement *ast.BreakStatement) ast.Repr
- func (checker *Checker) VisitCastingExpression(expression *ast.CastingExpression) ast.Repr
- func (checker *Checker) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) ast.Repr
- func (checker *Checker) VisitCondition(condition *ast.Condition) ast.Repr
- func (checker *Checker) VisitConditionalExpression(expression *ast.ConditionalExpression) ast.Repr
- func (checker *Checker) VisitContinueStatement(statement *ast.ContinueStatement) ast.Repr
- func (checker *Checker) VisitCreateExpression(expression *ast.CreateExpression) ast.Repr
- func (checker *Checker) VisitDestroyExpression(expression *ast.DestroyExpression) (resultType ast.Repr)
- func (checker *Checker) VisitDictionaryExpression(expression *ast.DictionaryExpression) ast.Repr
- func (checker *Checker) VisitEmitStatement(statement *ast.EmitStatement) ast.Repr
- func (checker *Checker) VisitExpressionStatement(statement *ast.ExpressionStatement) ast.Repr
- func (checker *Checker) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr
- func (checker *Checker) VisitFixedPointExpression(expression *ast.FixedPointExpression) ast.Repr
- func (checker *Checker) VisitForStatement(statement *ast.ForStatement) ast.Repr
- func (checker *Checker) VisitForceExpression(expression *ast.ForceExpression) ast.Repr
- func (checker *Checker) VisitFunctionBlock(functionBlock *ast.FunctionBlock) ast.Repr
- func (checker *Checker) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr
- func (checker *Checker) VisitFunctionExpression(expression *ast.FunctionExpression) ast.Repr
- func (checker *Checker) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr
- func (checker *Checker) VisitIfStatement(statement *ast.IfStatement) ast.Repr
- func (checker *Checker) VisitImportDeclaration(_ *ast.ImportDeclaration) ast.Repr
- func (checker *Checker) VisitIndexExpression(expression *ast.IndexExpression) ast.Repr
- func (checker *Checker) VisitIntegerExpression(_ *ast.IntegerExpression) ast.Repr
- func (checker *Checker) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) ast.Repr
- func (checker *Checker) VisitInvocationExpression(invocationExpression *ast.InvocationExpression) ast.Repr
- func (checker *Checker) VisitMemberExpression(expression *ast.MemberExpression) ast.Repr
- func (checker *Checker) VisitNilExpression(_ *ast.NilExpression) ast.Repr
- func (checker *Checker) VisitPathExpression(expression *ast.PathExpression) ast.Repr
- func (checker *Checker) VisitProgram(program *ast.Program) ast.Repr
- func (checker *Checker) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) ast.Repr
- func (checker *Checker) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr
- func (checker *Checker) VisitStringExpression(_ *ast.StringExpression) ast.Repr
- func (checker *Checker) VisitSwapStatement(swap *ast.SwapStatement) ast.Repr
- func (checker *Checker) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) ast.Repr
- func (checker *Checker) VisitUnaryExpression(expression *ast.UnaryExpression) ast.Repr
- func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr
- func (checker *Checker) VisitWhileStatement(statement *ast.WhileStatement) ast.Repr
- type CheckerError
- type CompositeKindMismatchError
- type CompositeKindedType
- type CompositeType
- func (t *CompositeType) AllConformances() []*InterfaceType
- func (t *CompositeType) CanHaveMembers() bool
- func (t *CompositeType) ConformanceSet() InterfaceSet
- func (*CompositeType) ContainsFirstLevelInterfaceType() bool
- func (t *CompositeType) Equal(other Type) bool
- func (t *CompositeType) GetCompositeKind() common.CompositeKind
- func (t *CompositeType) GetContainerType() Type
- func (t *CompositeType) GetLocation() ast.Location
- func (t *CompositeType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (t *CompositeType) ID() TypeID
- func (t *CompositeType) InterfaceType() *InterfaceType
- func (*CompositeType) IsInvalidType() bool
- func (t *CompositeType) IsResourceType() bool
- func (*CompositeType) IsType()
- func (t *CompositeType) NestedTypes() map[string]Type
- func (t *CompositeType) QualifiedIdentifier() string
- func (t *CompositeType) QualifiedString() string
- func (t *CompositeType) Resolve(_ map[*TypeParameter]Type) Type
- func (t *CompositeType) String() string
- func (*CompositeType) TypeAnnotationState() TypeAnnotationState
- func (t *CompositeType) TypeRequirements() []*CompositeType
- func (*CompositeType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type ConformanceError
- type ConstantSizedArrayLiteralSizeError
- type ConstantSizedType
- func (t *ConstantSizedType) CanHaveMembers() bool
- func (t *ConstantSizedType) ContainsFirstLevelInterfaceType() bool
- func (t *ConstantSizedType) ElementType(_ bool) Type
- func (t *ConstantSizedType) Equal(other Type) bool
- func (t *ConstantSizedType) GetMember(identifier string, targetRange ast.Range, report func(error)) *Member
- func (t *ConstantSizedType) ID() TypeID
- func (t *ConstantSizedType) IndexingType() Type
- func (t *ConstantSizedType) IsInvalidType() bool
- func (t *ConstantSizedType) IsResourceType() bool
- func (*ConstantSizedType) IsType()
- func (t *ConstantSizedType) QualifiedString() string
- func (t *ConstantSizedType) Resolve(typeParameters map[*TypeParameter]Type) Type
- func (t *ConstantSizedType) String() string
- func (t *ConstantSizedType) TypeAnnotationState() TypeAnnotationState
- func (t *ConstantSizedType) Unify(other Type, typeParameters map[*TypeParameter]Type, report func(err error), ...) bool
- type ContainedType
- type ContainerKind
- type ContainerType
- type ControlStatementError
- type DeclarationKindMismatchError
- type DictionaryEntryType
- type DictionaryType
- func (t *DictionaryType) CanHaveMembers() bool
- func (t *DictionaryType) ContainsFirstLevelInterfaceType() bool
- func (t *DictionaryType) ElementType(_ bool) Type
- func (t *DictionaryType) Equal(other Type) bool
- func (t *DictionaryType) GetMember(identifier string, targetRange ast.Range, report func(error)) *Member
- func (t *DictionaryType) ID() TypeID
- func (t *DictionaryType) IndexingType() Type
- func (t *DictionaryType) IsInvalidType() bool
- func (t *DictionaryType) IsResourceType() bool
- func (*DictionaryType) IsType()
- func (t *DictionaryType) QualifiedString() string
- func (t *DictionaryType) Resolve(typeParameters map[*TypeParameter]Type) Type
- func (t *DictionaryType) String() string
- func (t *DictionaryType) TypeAnnotationState() TypeAnnotationState
- func (t *DictionaryType) Unify(other Type, typeParameters map[*TypeParameter]Type, report func(err error), ...) bool
- type DuplicateConformanceError
- type Elaboration
- type EmitImportedEventError
- type EmitNonEventError
- type FieldUninitializedError
- type Fix64Type
- func (*Fix64Type) ContainsFirstLevelInterfaceType() bool
- func (*Fix64Type) Equal(other Type) bool
- func (*Fix64Type) ID() TypeID
- func (*Fix64Type) IsInvalidType() bool
- func (*Fix64Type) IsResourceType() bool
- func (*Fix64Type) IsType()
- func (*Fix64Type) MaxFractional() *big.Int
- func (*Fix64Type) MaxInt() *big.Int
- func (*Fix64Type) MinFractional() *big.Int
- func (*Fix64Type) MinInt() *big.Int
- func (*Fix64Type) QualifiedString() string
- func (t *Fix64Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Fix64Type) Scale() uint
- func (*Fix64Type) String() string
- func (*Fix64Type) TypeAnnotationState() TypeAnnotationState
- func (*Fix64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type FixedPointType
- func (*FixedPointType) ContainsFirstLevelInterfaceType() bool
- func (*FixedPointType) Equal(other Type) bool
- func (*FixedPointType) ID() TypeID
- func (*FixedPointType) IsInvalidType() bool
- func (*FixedPointType) IsResourceType() bool
- func (*FixedPointType) IsType()
- func (*FixedPointType) MaxInt() *big.Int
- func (*FixedPointType) MinInt() *big.Int
- func (*FixedPointType) QualifiedString() string
- func (t *FixedPointType) Resolve(_ map[*TypeParameter]Type) Type
- func (*FixedPointType) String() string
- func (*FixedPointType) TypeAnnotationState() TypeAnnotationState
- func (*FixedPointType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type FractionalRangedType
- type FunctionActivation
- type FunctionActivations
- func (a *FunctionActivations) Current() *FunctionActivation
- func (a *FunctionActivations) EnterFunction(functionType *FunctionType, valueActivationDepth int)
- func (a *FunctionActivations) EnterLoop()
- func (a *FunctionActivations) IsLocal() bool
- func (a *FunctionActivations) LeaveFunction()
- func (a *FunctionActivations) LeaveLoop()
- func (a *FunctionActivations) WithFunction(functionType *FunctionType, valueActivationDepth int, f func())
- func (a *FunctionActivations) WithLoop(f func())
- type FunctionExpressionInConditionError
- type FunctionType
- func (t *FunctionType) ArgumentLabels() (argumentLabels []string)
- func (*FunctionType) CheckArgumentExpressions(_ *Checker, _ []ast.Expression)
- func (t *FunctionType) ContainsFirstLevelInterfaceType() bool
- func (t *FunctionType) Equal(other Type) bool
- func (t *FunctionType) EqualIncludingArgumentLabels(other Type) bool
- func (t *FunctionType) ID() TypeID
- func (t *FunctionType) InvocationFunctionType() *FunctionType
- func (t *FunctionType) IsInvalidType() bool
- func (*FunctionType) IsResourceType() bool
- func (*FunctionType) IsType()
- func (t *FunctionType) QualifiedString() string
- func (t *FunctionType) Resolve(_ map[*TypeParameter]Type) Type
- func (t *FunctionType) String() string
- func (t *FunctionType) TypeAnnotationState() TypeAnnotationState
- func (*FunctionType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type GenericType
- func (t *GenericType) ContainsFirstLevelInterfaceType() bool
- func (t *GenericType) Equal(other Type) bool
- func (t *GenericType) ID() TypeID
- func (t *GenericType) IsInvalidType() bool
- func (t *GenericType) IsResourceType() bool
- func (*GenericType) IsType()
- func (t *GenericType) QualifiedString() string
- func (t *GenericType) Resolve(typeParameters map[*TypeParameter]Type) Type
- func (t *GenericType) String() string
- func (t *GenericType) TypeAnnotationState() TypeAnnotationState
- func (t *GenericType) Unify(other Type, typeParameters map[*TypeParameter]Type, report func(err error), ...) bool
- type ImportedProgramError
- type IncorrectArgumentLabelError
- type IncorrectTransferOperationError
- type InitializationInfo
- type InitializerMismatch
- type Int128Type
- func (*Int128Type) ContainsFirstLevelInterfaceType() bool
- func (*Int128Type) Equal(other Type) bool
- func (*Int128Type) ID() TypeID
- func (*Int128Type) IsInvalidType() bool
- func (*Int128Type) IsResourceType() bool
- func (*Int128Type) IsType()
- func (*Int128Type) MaxInt() *big.Int
- func (*Int128Type) MinInt() *big.Int
- func (*Int128Type) QualifiedString() string
- func (t *Int128Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Int128Type) String() string
- func (*Int128Type) TypeAnnotationState() TypeAnnotationState
- func (*Int128Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Int16Type
- func (*Int16Type) ContainsFirstLevelInterfaceType() bool
- func (*Int16Type) Equal(other Type) bool
- func (*Int16Type) ID() TypeID
- func (*Int16Type) IsInvalidType() bool
- func (*Int16Type) IsResourceType() bool
- func (*Int16Type) IsType()
- func (*Int16Type) MaxInt() *big.Int
- func (*Int16Type) MinInt() *big.Int
- func (*Int16Type) QualifiedString() string
- func (t *Int16Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Int16Type) String() string
- func (*Int16Type) TypeAnnotationState() TypeAnnotationState
- func (*Int16Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Int256Type
- func (*Int256Type) ContainsFirstLevelInterfaceType() bool
- func (*Int256Type) Equal(other Type) bool
- func (*Int256Type) ID() TypeID
- func (*Int256Type) IsInvalidType() bool
- func (*Int256Type) IsResourceType() bool
- func (*Int256Type) IsType()
- func (*Int256Type) MaxInt() *big.Int
- func (*Int256Type) MinInt() *big.Int
- func (*Int256Type) QualifiedString() string
- func (t *Int256Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Int256Type) String() string
- func (*Int256Type) TypeAnnotationState() TypeAnnotationState
- func (*Int256Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Int32Type
- func (*Int32Type) ContainsFirstLevelInterfaceType() bool
- func (*Int32Type) Equal(other Type) bool
- func (*Int32Type) ID() TypeID
- func (*Int32Type) IsInvalidType() bool
- func (*Int32Type) IsResourceType() bool
- func (*Int32Type) IsType()
- func (*Int32Type) MaxInt() *big.Int
- func (*Int32Type) MinInt() *big.Int
- func (*Int32Type) QualifiedString() string
- func (t *Int32Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Int32Type) String() string
- func (*Int32Type) TypeAnnotationState() TypeAnnotationState
- func (*Int32Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Int64Type
- func (*Int64Type) ContainsFirstLevelInterfaceType() bool
- func (*Int64Type) Equal(other Type) bool
- func (*Int64Type) ID() TypeID
- func (*Int64Type) IsInvalidType() bool
- func (*Int64Type) IsResourceType() bool
- func (*Int64Type) IsType()
- func (*Int64Type) MaxInt() *big.Int
- func (*Int64Type) MinInt() *big.Int
- func (*Int64Type) QualifiedString() string
- func (t *Int64Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Int64Type) String() string
- func (*Int64Type) TypeAnnotationState() TypeAnnotationState
- func (*Int64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Int8Type
- func (*Int8Type) ContainsFirstLevelInterfaceType() bool
- func (*Int8Type) Equal(other Type) bool
- func (*Int8Type) ID() TypeID
- func (*Int8Type) IsInvalidType() bool
- func (*Int8Type) IsResourceType() bool
- func (*Int8Type) IsType()
- func (*Int8Type) MaxInt() *big.Int
- func (*Int8Type) MinInt() *big.Int
- func (*Int8Type) QualifiedString() string
- func (t *Int8Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Int8Type) String() string
- func (*Int8Type) TypeAnnotationState() TypeAnnotationState
- func (*Int8Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type IntType
- func (*IntType) ContainsFirstLevelInterfaceType() bool
- func (*IntType) Equal(other Type) bool
- func (*IntType) ID() TypeID
- func (*IntType) IsInvalidType() bool
- func (*IntType) IsResourceType() bool
- func (*IntType) IsType()
- func (*IntType) MaxInt() *big.Int
- func (*IntType) MinInt() *big.Int
- func (*IntType) QualifiedString() string
- func (t *IntType) Resolve(_ map[*TypeParameter]Type) Type
- func (*IntType) String() string
- func (*IntType) TypeAnnotationState() TypeAnnotationState
- func (*IntType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type IntegerRangedType
- type IntegerType
- func (*IntegerType) ContainsFirstLevelInterfaceType() bool
- func (*IntegerType) Equal(other Type) bool
- func (*IntegerType) ID() TypeID
- func (*IntegerType) IsInvalidType() bool
- func (*IntegerType) IsResourceType() bool
- func (*IntegerType) IsType()
- func (*IntegerType) MaxInt() *big.Int
- func (*IntegerType) MinInt() *big.Int
- func (*IntegerType) QualifiedString() string
- func (t *IntegerType) Resolve(_ map[*TypeParameter]Type) Type
- func (*IntegerType) String() string
- func (*IntegerType) TypeAnnotationState() TypeAnnotationState
- func (*IntegerType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type InterfaceSet
- type InterfaceType
- func (t *InterfaceType) CanHaveMembers() bool
- func (t *InterfaceType) ContainsFirstLevelInterfaceType() bool
- func (t *InterfaceType) Equal(other Type) bool
- func (t *InterfaceType) GetCompositeKind() common.CompositeKind
- func (t *InterfaceType) GetContainerType() Type
- func (t *InterfaceType) GetLocation() ast.Location
- func (t *InterfaceType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (t *InterfaceType) ID() TypeID
- func (t *InterfaceType) IsInvalidType() bool
- func (t *InterfaceType) IsResourceType() bool
- func (*InterfaceType) IsType()
- func (t *InterfaceType) NestedTypes() map[string]Type
- func (t *InterfaceType) QualifiedIdentifier() string
- func (t *InterfaceType) QualifiedString() string
- func (t *InterfaceType) Resolve(_ map[*TypeParameter]Type) Type
- func (t *InterfaceType) String() string
- func (*InterfaceType) TypeAnnotationState() TypeAnnotationState
- func (*InterfaceType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type InvalidAccessError
- type InvalidAccessModifierError
- type InvalidAddressLiteralError
- type InvalidAssignmentAccessError
- type InvalidAssignmentTargetError
- type InvalidBinaryOperandError
- type InvalidBinaryOperandsError
- type InvalidCharacterLiteralError
- type InvalidConformanceError
- type InvalidConstantSizedTypeBaseError
- type InvalidConstantSizedTypeSizeError
- type InvalidConstructionError
- type InvalidDeclarationError
- type InvalidDestructionError
- type InvalidDestructorError
- type InvalidDestructorParametersError
- type InvalidDictionaryKeyTypeError
- type InvalidEventParameterTypeError
- type InvalidEventUsageError
- type InvalidFailableResourceDowncastOutsideOptionalBindingError
- type InvalidFixedPointLiteralRangeError
- type InvalidFixedPointLiteralScaleError
- type InvalidImplementationError
- type InvalidIndexingError
- type InvalidIntegerLiteralRangeError
- type InvalidInterfaceTypeError
- type InvalidMoveError
- type InvalidMoveOperationError
- type InvalidNameError
- type InvalidNestedDeclarationError
- type InvalidNestedResourceMoveError
- type InvalidNestedTypeError
- type InvalidNilCoalescingRightResourceOperandError
- type InvalidNonConformanceRestrictionError
- type InvalidOptionalChainingError
- type InvalidPathDomainError
- type InvalidResourceAnnotationError
- type InvalidResourceArrayMemberError
- type InvalidResourceAssignmentError
- type InvalidResourceCreationError
- type InvalidResourceDictionaryMemberError
- type InvalidResourceFieldError
- type InvalidResourceTransactionParameterError
- type InvalidRestrictedTypeError
- type InvalidRestrictedTypeMemberAccessError
- type InvalidRestrictionTypeDuplicateError
- type InvalidRestrictionTypeError
- type InvalidReturnValueError
- type InvalidSelfInvalidationError
- type InvalidSwapExpressionError
- type InvalidTopLevelDeclarationError
- type InvalidTransactionBlockError
- type InvalidTransactionFieldAccessModifierError
- type InvalidTransactionPrepareParameterTypeError
- type InvalidType
- func (*InvalidType) ContainsFirstLevelInterfaceType() bool
- func (*InvalidType) Equal(other Type) bool
- func (*InvalidType) ID() TypeID
- func (*InvalidType) IsInvalidType() bool
- func (*InvalidType) IsResourceType() bool
- func (*InvalidType) IsType()
- func (*InvalidType) QualifiedString() string
- func (t *InvalidType) Resolve(_ map[*TypeParameter]Type) Type
- func (*InvalidType) String() string
- func (*InvalidType) TypeAnnotationState() TypeAnnotationState
- func (*InvalidType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type InvalidTypeArgumentCountError
- type InvalidTypeIndexingError
- type InvalidUnaryOperandError
- type InvalidVariableKindError
- type InvokableType
- type LocatedType
- type Member
- type MemberAccessibleType
- type MemberInfo
- type MemberMismatch
- type MemberMismatchNote
- type MemberSet
- type MissingAccessModifierError
- type MissingArgumentLabelError
- type MissingConformanceError
- type MissingCreateError
- type MissingDestructorError
- type MissingFunctionBodyError
- type MissingInitializerError
- type MissingLocationError
- type MissingMoveOperationError
- type MissingResourceAnnotationError
- type MissingReturnStatementError
- type NeverType
- func (*NeverType) ContainsFirstLevelInterfaceType() bool
- func (*NeverType) Equal(other Type) bool
- func (*NeverType) ID() TypeID
- func (*NeverType) IsInvalidType() bool
- func (*NeverType) IsResourceType() bool
- func (*NeverType) IsType()
- func (*NeverType) QualifiedString() string
- func (t *NeverType) Resolve(_ map[*TypeParameter]Type) Type
- func (*NeverType) String() string
- func (*NeverType) TypeAnnotationState() TypeAnnotationState
- func (*NeverType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type NonOptionalForceError
- type NonReferenceTypeReferenceError
- type NonResourceTypeError
- type NotCallableError
- type NotDeclaredError
- type NotDeclaredMemberError
- type NotEquatableTypeError
- type NotExportedError
- type NotIndexableTypeError
- type NotIndexingTypeError
- type NumberType
- func (*NumberType) ContainsFirstLevelInterfaceType() bool
- func (*NumberType) Equal(other Type) bool
- func (*NumberType) ID() TypeID
- func (*NumberType) IsInvalidType() bool
- func (*NumberType) IsResourceType() bool
- func (*NumberType) IsType()
- func (*NumberType) MaxInt() *big.Int
- func (*NumberType) MinInt() *big.Int
- func (*NumberType) QualifiedString() string
- func (t *NumberType) Resolve(_ map[*TypeParameter]Type) Type
- func (*NumberType) String() string
- func (*NumberType) TypeAnnotationState() TypeAnnotationState
- func (*NumberType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Occurrence
- type Occurrences
- type Option
- func WithAccessCheckMode(mode AccessCheckMode) Option
- func WithAllCheckers(allCheckers map[ast.LocationID]*Checker) Option
- func WithCheckHandler(handler CheckHandlerFunc) Option
- func WithPredeclaredTypes(predeclaredTypes map[string]TypeDeclaration) Option
- func WithPredeclaredValues(predeclaredValues map[string]ValueDeclaration) Option
- func WithValidTopLevelDeclarationsHandler(handler func(location ast.Location) []common.DeclarationKind) Option
- type OptionalType
- func (t *OptionalType) ContainsFirstLevelInterfaceType() bool
- func (t *OptionalType) Equal(other Type) bool
- func (t *OptionalType) ID() TypeID
- func (t *OptionalType) IsInvalidType() bool
- func (t *OptionalType) IsResourceType() bool
- func (*OptionalType) IsType()
- func (t *OptionalType) QualifiedString() string
- func (t *OptionalType) Resolve(typeParameters map[*TypeParameter]Type) Type
- func (t *OptionalType) String() string
- func (t *OptionalType) TypeAnnotationState() TypeAnnotationState
- func (t *OptionalType) Unify(other Type, typeParameters map[*TypeParameter]Type, report func(err error), ...) bool
- type OptionalTypeReferenceError
- type Origin
- type Parameter
- type PathType
- func (*PathType) ContainsFirstLevelInterfaceType() bool
- func (*PathType) Equal(other Type) bool
- func (*PathType) ID() TypeID
- func (*PathType) IsInvalidType() bool
- func (*PathType) IsResourceType() bool
- func (*PathType) IsType()
- func (*PathType) QualifiedString() string
- func (t *PathType) Resolve(_ map[*TypeParameter]Type) Type
- func (*PathType) String() string
- func (*PathType) TypeAnnotationState() TypeAnnotationState
- func (*PathType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Position
- type PostConditionsRewrite
- type PublicAccountType
- func (*PublicAccountType) CanHaveMembers() bool
- func (*PublicAccountType) ContainsFirstLevelInterfaceType() bool
- func (*PublicAccountType) Equal(other Type) bool
- func (t *PublicAccountType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (*PublicAccountType) ID() TypeID
- func (*PublicAccountType) IsInvalidType() bool
- func (*PublicAccountType) IsResourceType() bool
- func (*PublicAccountType) IsType()
- func (*PublicAccountType) QualifiedString() string
- func (t *PublicAccountType) Resolve(_ map[*TypeParameter]Type) Type
- func (*PublicAccountType) String() string
- func (*PublicAccountType) TypeAnnotationState() TypeAnnotationState
- func (*PublicAccountType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type ReadOnlyTargetAssignmentError
- type RedeclarationError
- type RedeclarationNote
- type ReferenceType
- func (t *ReferenceType) CanHaveMembers() bool
- func (t *ReferenceType) ContainsFirstLevelInterfaceType() bool
- func (t *ReferenceType) ElementType(isAssignment bool) Type
- func (t *ReferenceType) Equal(other Type) bool
- func (t *ReferenceType) GetMember(identifier string, targetRange ast.Range, report func(error)) *Member
- func (t *ReferenceType) ID() TypeID
- func (t *ReferenceType) IndexingType() Type
- func (t *ReferenceType) IsInvalidType() bool
- func (t *ReferenceType) IsResourceType() bool
- func (*ReferenceType) IsType()
- func (t *ReferenceType) QualifiedString() string
- func (t *ReferenceType) Resolve(_ map[*TypeParameter]Type) Type
- func (t *ReferenceType) String() string
- func (*ReferenceType) TypeAnnotationState() TypeAnnotationState
- func (*ReferenceType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type RepeatedImportError
- type ResourceCapturingError
- type ResourceFieldNotInvalidatedError
- type ResourceInfo
- type ResourceInvalidation
- type ResourceInvalidationEntry
- type ResourceInvalidationKind
- type ResourceInvalidationNote
- type ResourceInvalidations
- func (ris ResourceInvalidations) All() (result []ResourceInvalidation)
- func (ris ResourceInvalidations) Include(invalidation ResourceInvalidation) bool
- func (ris ResourceInvalidations) Insert(invalidation ResourceInvalidation) ResourceInvalidations
- func (ris ResourceInvalidations) IsEmpty() bool
- func (ris ResourceInvalidations) Merge(other ResourceInvalidations) ResourceInvalidations
- func (ris ResourceInvalidations) Size() int
- type ResourceLossError
- type ResourceMethodBindingError
- type ResourceUse
- type ResourceUseAfterInvalidationError
- func (e *ResourceUseAfterInvalidationError) Cause() (wasMoved, wasDestroyed bool)
- func (e *ResourceUseAfterInvalidationError) EndPosition() ast.Position
- func (e *ResourceUseAfterInvalidationError) Error() string
- func (e *ResourceUseAfterInvalidationError) ErrorNotes() (notes []errors.ErrorNote)
- func (e *ResourceUseAfterInvalidationError) HasInvalidationInPreviousLoopIteration() (result bool)
- func (e *ResourceUseAfterInvalidationError) SecondaryError() string
- func (e *ResourceUseAfterInvalidationError) StartPosition() ast.Position
- type ResourceUseEntry
- type ResourceUses
- func (p ResourceUses) AllPositions() (result []ast.Position)
- func (p ResourceUses) Include(pos ast.Position) bool
- func (p ResourceUses) Insert(pos ast.Position) ResourceUses
- func (p ResourceUses) IsUseAfterInvalidationReported(pos ast.Position) bool
- func (p ResourceUses) MarkUseAfterInvalidationReported(pos ast.Position) ResourceUses
- func (p ResourceUses) Merge(other ResourceUses) ResourceUses
- func (p ResourceUses) Size() int
- type Resources
- func (ris *Resources) AddInvalidation(resource interface{}, invalidation ResourceInvalidation)
- func (ris *Resources) AddUse(resource interface{}, use ast.Position)
- func (ris *Resources) Clone() *Resources
- func (ris *Resources) FirstRest() (interface{}, ResourceInfo, *Resources)
- func (ris *Resources) ForEachResourceInfo(f func(resource interface{}, info ResourceInfo))
- func (ris *Resources) Get(resource interface{}) ResourceInfo
- func (ris *Resources) IsUseAfterInvalidationReported(resource interface{}, pos ast.Position) bool
- func (ris *Resources) MarkUseAfterInvalidationReported(resource interface{}, pos ast.Position)
- func (ris *Resources) MergeBranches(thenResources *Resources, elseResources *Resources)
- func (ris *Resources) Size() int
- func (ris *Resources) String() string
- type RestrictedType
- func (t *RestrictedType) CanHaveMembers() bool
- func (*RestrictedType) ContainsFirstLevelInterfaceType() bool
- func (t *RestrictedType) Equal(other Type) bool
- func (t *RestrictedType) GetMember(identifier string, targetRange ast.Range, reportError func(error)) *Member
- func (t *RestrictedType) ID() TypeID
- func (t *RestrictedType) IsInvalidType() bool
- func (t *RestrictedType) IsResourceType() bool
- func (*RestrictedType) IsType()
- func (t *RestrictedType) QualifiedString() string
- func (t *RestrictedType) Resolve(_ map[*TypeParameter]Type) Type
- func (t *RestrictedType) RestrictionSet() InterfaceSet
- func (t *RestrictedType) String() string
- func (*RestrictedType) TypeAnnotationState() TypeAnnotationState
- func (*RestrictedType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type RestrictionCompositeKindMismatchError
- type RestrictionMemberClashError
- type ReturnInfo
- type SemanticError
- type SignedFixedPointType
- func (*SignedFixedPointType) ContainsFirstLevelInterfaceType() bool
- func (*SignedFixedPointType) Equal(other Type) bool
- func (*SignedFixedPointType) ID() TypeID
- func (*SignedFixedPointType) IsInvalidType() bool
- func (*SignedFixedPointType) IsResourceType() bool
- func (*SignedFixedPointType) IsType()
- func (*SignedFixedPointType) MaxInt() *big.Int
- func (*SignedFixedPointType) MinInt() *big.Int
- func (*SignedFixedPointType) QualifiedString() string
- func (t *SignedFixedPointType) Resolve(_ map[*TypeParameter]Type) Type
- func (*SignedFixedPointType) String() string
- func (*SignedFixedPointType) TypeAnnotationState() TypeAnnotationState
- func (*SignedFixedPointType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type SignedIntegerType
- func (*SignedIntegerType) ContainsFirstLevelInterfaceType() bool
- func (*SignedIntegerType) Equal(other Type) bool
- func (*SignedIntegerType) ID() TypeID
- func (*SignedIntegerType) IsInvalidType() bool
- func (*SignedIntegerType) IsResourceType() bool
- func (*SignedIntegerType) IsType()
- func (*SignedIntegerType) MaxInt() *big.Int
- func (*SignedIntegerType) MinInt() *big.Int
- func (*SignedIntegerType) QualifiedString() string
- func (t *SignedIntegerType) Resolve(_ map[*TypeParameter]Type) Type
- func (*SignedIntegerType) String() string
- func (*SignedIntegerType) TypeAnnotationState() TypeAnnotationState
- func (*SignedIntegerType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type SignedNumberType
- func (*SignedNumberType) ContainsFirstLevelInterfaceType() bool
- func (*SignedNumberType) Equal(other Type) bool
- func (*SignedNumberType) ID() TypeID
- func (*SignedNumberType) IsInvalidType() bool
- func (*SignedNumberType) IsResourceType() bool
- func (*SignedNumberType) IsType()
- func (*SignedNumberType) MaxInt() *big.Int
- func (*SignedNumberType) MinInt() *big.Int
- func (*SignedNumberType) QualifiedString() string
- func (t *SignedNumberType) Resolve(_ map[*TypeParameter]Type) Type
- func (*SignedNumberType) String() string
- func (*SignedNumberType) TypeAnnotationState() TypeAnnotationState
- func (*SignedNumberType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type SpecialFunctionType
- type StringType
- func (*StringType) CanHaveMembers() bool
- func (*StringType) ContainsFirstLevelInterfaceType() bool
- func (t *StringType) ElementType(_ bool) Type
- func (*StringType) Equal(other Type) bool
- func (t *StringType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (*StringType) ID() TypeID
- func (t *StringType) IndexingType() Type
- func (*StringType) IsInvalidType() bool
- func (*StringType) IsResourceType() bool
- func (*StringType) IsType()
- func (*StringType) QualifiedString() string
- func (t *StringType) Resolve(_ map[*TypeParameter]Type) Type
- func (*StringType) String() string
- func (*StringType) TypeAnnotationState() TypeAnnotationState
- func (*StringType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type TransactionMissingPrepareError
- type TransactionType
- func (t *TransactionType) CanHaveMembers() bool
- func (*TransactionType) ContainsFirstLevelInterfaceType() bool
- func (t *TransactionType) EntryPointFunctionType() *FunctionType
- func (*TransactionType) Equal(other Type) bool
- func (*TransactionType) ExecuteFunctionType() *SpecialFunctionType
- func (t *TransactionType) GetMember(identifier string, _ ast.Range, _ func(error)) *Member
- func (*TransactionType) ID() TypeID
- func (*TransactionType) IsInvalidType() bool
- func (*TransactionType) IsResourceType() bool
- func (*TransactionType) IsType()
- func (t *TransactionType) PrepareFunctionType() *SpecialFunctionType
- func (*TransactionType) QualifiedString() string
- func (t *TransactionType) Resolve(_ map[*TypeParameter]Type) Type
- func (*TransactionType) String() string
- func (*TransactionType) TypeAnnotationState() TypeAnnotationState
- func (*TransactionType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Type
- type TypeAnnotation
- type TypeAnnotationState
- type TypeCheckFunc
- type TypeDeclaration
- type TypeID
- type TypeMismatchError
- type TypeMismatchWithDescriptionError
- type TypeParameter
- type TypeParameterTypeInferenceError
- type TypeParameterTypeMismatchError
- type UFix64Type
- func (*UFix64Type) ContainsFirstLevelInterfaceType() bool
- func (*UFix64Type) Equal(other Type) bool
- func (*UFix64Type) ID() TypeID
- func (*UFix64Type) IsInvalidType() bool
- func (*UFix64Type) IsResourceType() bool
- func (*UFix64Type) IsType()
- func (*UFix64Type) MaxFractional() *big.Int
- func (*UFix64Type) MaxInt() *big.Int
- func (*UFix64Type) MinFractional() *big.Int
- func (*UFix64Type) MinInt() *big.Int
- func (*UFix64Type) QualifiedString() string
- func (t *UFix64Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UFix64Type) Scale() uint
- func (*UFix64Type) String() string
- func (*UFix64Type) TypeAnnotationState() TypeAnnotationState
- func (*UFix64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UInt128Type
- func (*UInt128Type) ContainsFirstLevelInterfaceType() bool
- func (*UInt128Type) Equal(other Type) bool
- func (*UInt128Type) ID() TypeID
- func (*UInt128Type) IsInvalidType() bool
- func (*UInt128Type) IsResourceType() bool
- func (*UInt128Type) IsType()
- func (*UInt128Type) MaxInt() *big.Int
- func (*UInt128Type) MinInt() *big.Int
- func (*UInt128Type) QualifiedString() string
- func (t *UInt128Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UInt128Type) String() string
- func (*UInt128Type) TypeAnnotationState() TypeAnnotationState
- func (*UInt128Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UInt16Type
- func (*UInt16Type) ContainsFirstLevelInterfaceType() bool
- func (*UInt16Type) Equal(other Type) bool
- func (*UInt16Type) ID() TypeID
- func (*UInt16Type) IsInvalidType() bool
- func (*UInt16Type) IsResourceType() bool
- func (*UInt16Type) IsType()
- func (*UInt16Type) MaxInt() *big.Int
- func (*UInt16Type) MinInt() *big.Int
- func (*UInt16Type) QualifiedString() string
- func (t *UInt16Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UInt16Type) String() string
- func (*UInt16Type) TypeAnnotationState() TypeAnnotationState
- func (*UInt16Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UInt256Type
- func (*UInt256Type) ContainsFirstLevelInterfaceType() bool
- func (*UInt256Type) Equal(other Type) bool
- func (*UInt256Type) ID() TypeID
- func (*UInt256Type) IsInvalidType() bool
- func (*UInt256Type) IsResourceType() bool
- func (*UInt256Type) IsType()
- func (*UInt256Type) MaxInt() *big.Int
- func (*UInt256Type) MinInt() *big.Int
- func (*UInt256Type) QualifiedString() string
- func (t *UInt256Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UInt256Type) String() string
- func (*UInt256Type) TypeAnnotationState() TypeAnnotationState
- func (*UInt256Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UInt32Type
- func (*UInt32Type) ContainsFirstLevelInterfaceType() bool
- func (*UInt32Type) Equal(other Type) bool
- func (*UInt32Type) ID() TypeID
- func (*UInt32Type) IsInvalidType() bool
- func (*UInt32Type) IsResourceType() bool
- func (*UInt32Type) IsType()
- func (*UInt32Type) MaxInt() *big.Int
- func (*UInt32Type) MinInt() *big.Int
- func (*UInt32Type) QualifiedString() string
- func (t *UInt32Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UInt32Type) String() string
- func (*UInt32Type) TypeAnnotationState() TypeAnnotationState
- func (*UInt32Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UInt64Type
- func (*UInt64Type) ContainsFirstLevelInterfaceType() bool
- func (*UInt64Type) Equal(other Type) bool
- func (*UInt64Type) ID() TypeID
- func (*UInt64Type) IsInvalidType() bool
- func (*UInt64Type) IsResourceType() bool
- func (*UInt64Type) IsType()
- func (*UInt64Type) MaxInt() *big.Int
- func (*UInt64Type) MinInt() *big.Int
- func (*UInt64Type) QualifiedString() string
- func (t *UInt64Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UInt64Type) String() string
- func (*UInt64Type) TypeAnnotationState() TypeAnnotationState
- func (*UInt64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UInt8Type
- func (*UInt8Type) ContainsFirstLevelInterfaceType() bool
- func (*UInt8Type) Equal(other Type) bool
- func (*UInt8Type) ID() TypeID
- func (*UInt8Type) IsInvalidType() bool
- func (*UInt8Type) IsResourceType() bool
- func (*UInt8Type) IsType()
- func (*UInt8Type) MaxInt() *big.Int
- func (*UInt8Type) MinInt() *big.Int
- func (*UInt8Type) QualifiedString() string
- func (t *UInt8Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*UInt8Type) String() string
- func (*UInt8Type) TypeAnnotationState() TypeAnnotationState
- func (*UInt8Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UIntType
- func (*UIntType) ContainsFirstLevelInterfaceType() bool
- func (*UIntType) Equal(other Type) bool
- func (*UIntType) ID() TypeID
- func (*UIntType) IsInvalidType() bool
- func (*UIntType) IsResourceType() bool
- func (*UIntType) IsType()
- func (*UIntType) MaxInt() *big.Int
- func (*UIntType) MinInt() *big.Int
- func (*UIntType) QualifiedString() string
- func (t *UIntType) Resolve(_ map[*TypeParameter]Type) Type
- func (*UIntType) String() string
- func (*UIntType) TypeAnnotationState() TypeAnnotationState
- func (*UIntType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type UninitializedFieldAccessError
- type UninitializedUseError
- type UnknownSpecialFunctionError
- type UnreachableStatementError
- type UnresolvedImportError
- type UnsupportedOptionalChainingAssignmentError
- type UnsupportedOverloadingError
- type UnsupportedResourceForLoopError
- type ValueDeclaration
- type ValueIndexableType
- type Variable
- type VariableActivations
- func (a *VariableActivations) Declare(declaration variableDeclaration) (variable *Variable, err error)
- func (a *VariableActivations) DeclareImplicitConstant(identifier string, ty Type, kind common.DeclarationKind) (*Variable, error)
- func (a *VariableActivations) DeclareType(declaration typeDeclaration) (*Variable, error)
- func (a *VariableActivations) Depth() int
- func (a *VariableActivations) Enter()
- func (a *VariableActivations) Find(name string) *Variable
- func (a *VariableActivations) Leave()
- func (a *VariableActivations) Set(name string, variable *Variable)
- func (a *VariableActivations) VariablesDeclaredInAndBelow(depth int) map[string]*Variable
- type VariableSizedType
- func (t *VariableSizedType) CanHaveMembers() bool
- func (t *VariableSizedType) ContainsFirstLevelInterfaceType() bool
- func (t *VariableSizedType) ElementType(_ bool) Type
- func (t *VariableSizedType) Equal(other Type) bool
- func (t *VariableSizedType) GetMember(identifier string, targetRange ast.Range, report func(error)) *Member
- func (t *VariableSizedType) ID() TypeID
- func (t *VariableSizedType) IndexingType() Type
- func (t *VariableSizedType) IsInvalidType() bool
- func (t *VariableSizedType) IsResourceType() bool
- func (*VariableSizedType) IsType()
- func (t *VariableSizedType) QualifiedString() string
- func (t *VariableSizedType) Resolve(typeParameters map[*TypeParameter]Type) Type
- func (t *VariableSizedType) String() string
- func (t *VariableSizedType) TypeAnnotationState() TypeAnnotationState
- func (t *VariableSizedType) Unify(other Type, typeParameters map[*TypeParameter]Type, report func(err error), ...) bool
- type VoidType
- func (*VoidType) ContainsFirstLevelInterfaceType() bool
- func (*VoidType) Equal(other Type) bool
- func (*VoidType) ID() TypeID
- func (*VoidType) IsInvalidType() bool
- func (*VoidType) IsResourceType() bool
- func (*VoidType) IsType()
- func (*VoidType) QualifiedString() string
- func (t *VoidType) Resolve(_ map[*TypeParameter]Type) Type
- func (*VoidType) String() string
- func (*VoidType) TypeAnnotationState() TypeAnnotationState
- func (*VoidType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Word16Type
- func (*Word16Type) ContainsFirstLevelInterfaceType() bool
- func (*Word16Type) Equal(other Type) bool
- func (*Word16Type) ID() TypeID
- func (*Word16Type) IsInvalidType() bool
- func (*Word16Type) IsResourceType() bool
- func (*Word16Type) IsType()
- func (*Word16Type) MaxInt() *big.Int
- func (*Word16Type) MinInt() *big.Int
- func (*Word16Type) QualifiedString() string
- func (t *Word16Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Word16Type) String() string
- func (*Word16Type) TypeAnnotationState() TypeAnnotationState
- func (*Word16Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Word32Type
- func (*Word32Type) ContainsFirstLevelInterfaceType() bool
- func (*Word32Type) Equal(other Type) bool
- func (*Word32Type) ID() TypeID
- func (*Word32Type) IsInvalidType() bool
- func (*Word32Type) IsResourceType() bool
- func (*Word32Type) IsType()
- func (*Word32Type) MaxInt() *big.Int
- func (*Word32Type) MinInt() *big.Int
- func (*Word32Type) QualifiedString() string
- func (t *Word32Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Word32Type) String() string
- func (*Word32Type) TypeAnnotationState() TypeAnnotationState
- func (*Word32Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Word64Type
- func (*Word64Type) ContainsFirstLevelInterfaceType() bool
- func (*Word64Type) Equal(other Type) bool
- func (*Word64Type) ID() TypeID
- func (*Word64Type) IsInvalidType() bool
- func (*Word64Type) IsResourceType() bool
- func (*Word64Type) IsType()
- func (*Word64Type) MaxInt() *big.Int
- func (*Word64Type) MinInt() *big.Int
- func (*Word64Type) QualifiedString() string
- func (t *Word64Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Word64Type) String() string
- func (*Word64Type) TypeAnnotationState() TypeAnnotationState
- func (*Word64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
- type Word8Type
- func (*Word8Type) ContainsFirstLevelInterfaceType() bool
- func (*Word8Type) Equal(other Type) bool
- func (*Word8Type) ID() TypeID
- func (*Word8Type) IsInvalidType() bool
- func (*Word8Type) IsResourceType() bool
- func (*Word8Type) IsType()
- func (*Word8Type) MaxInt() *big.Int
- func (*Word8Type) MinInt() *big.Int
- func (*Word8Type) QualifiedString() string
- func (t *Word8Type) Resolve(_ map[*TypeParameter]Type) Type
- func (*Word8Type) String() string
- func (*Word8Type) TypeAnnotationState() TypeAnnotationState
- func (*Word8Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
Constants ¶
const ArgumentLabelNotRequired = "_"
const BeforeIdentifier = "before"
const Fix64Factor = 100_000_000
const Fix64Scale uint = 8
const Fix64TypeMaxFractional = math.MaxInt64 % Fix64Factor
const Fix64TypeMaxInt = math.MaxInt64 / Fix64Factor
const Fix64TypeMinFractional = math.MinInt64 % Fix64Factor
const Fix64TypeMinInt = math.MinInt64 / Fix64Factor
const ResultIdentifier = "result"
const SelfIdentifier = "self"
const UFix64TypeMaxFractional = math.MaxUint64 % uint64(Fix64Factor)
const UFix64TypeMaxInt = math.MaxUint64 / uint64(Fix64Factor)
const UFix64TypeMinFractional = 0
const UFix64TypeMinInt = 0
Variables ¶
var AccessCheckModes = []AccessCheckMode{ AccessCheckModeStrict, AccessCheckModeNotSpecifiedRestricted, AccessCheckModeNotSpecifiedUnrestricted, AccessCheckModeNone, }
var AddressTypeMinIntBig = new(big.Int)
var AllFixedPointTypes = append( AllUnsignedFixedPointTypes, AllSignedFixedPointTypes..., )
var AllIntegerTypes = append( AllUnsignedIntegerTypes, AllSignedIntegerTypes..., )
var AllNumberTypes = append( AllIntegerTypes, AllFixedPointTypes..., )
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 BaseValues = map[string]ValueDeclaration{}
var Fix64TypeMaxFractionalBig = new(big.Int).SetInt64(Fix64TypeMaxFractional)
var Fix64TypeMaxIntBig = new(big.Int).SetInt64(Fix64TypeMaxInt)
var Fix64TypeMinFractionalBig = new(big.Int).SetInt64(Fix64TypeMinFractional)
var Fix64TypeMinIntBig = new(big.Int).SetInt64(Fix64TypeMinInt)
var Int128TypeMaxIntBig *big.Int
var Int128TypeMinIntBig *big.Int
var Int256TypeMaxIntBig *big.Int
var Int256TypeMinIntBig *big.Int
var UFix64TypeMaxFractionalBig = new(big.Int).SetUint64(UFix64TypeMaxFractional)
var UFix64TypeMaxIntBig = new(big.Int).SetUint64(UFix64TypeMaxInt)
var UFix64TypeMinFractionalBig = new(big.Int).SetUint64(UFix64TypeMinFractional)
var UFix64TypeMinIntBig = new(big.Int).SetUint64(UFix64TypeMinInt)
var UInt128TypeMaxIntBig *big.Int
var UInt128TypeMinIntBig = new(big.Int)
var UInt16TypeMinInt = new(big.Int)
var UInt256TypeMaxIntBig *big.Int
var UInt256TypeMinIntBig = new(big.Int)
var UInt32TypeMinInt = new(big.Int)
var UInt64TypeMinInt = new(big.Int)
var UInt8TypeMinInt = new(big.Int)
var UIntTypeMin = new(big.Int)
var Word16TypeMinInt = new(big.Int)
var Word32TypeMinInt = new(big.Int)
var Word64TypeMinInt = new(big.Int)
var Word8TypeMinInt = new(big.Int)
Functions ¶
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 IsConcatenatableType ¶
func IsEquatableType ¶
func IsSubType ¶
IsSubType determines if the given subtype is a subtype of the given supertype.
Types are subtypes of themselves.
func VisitContainerAndNested ¶
func VisitContainerAndNested(t ContainerType, visit func(ty Type))
Types ¶
type AccessCheckMode ¶
type AccessCheckMode uint
const ( AccessCheckModeStrict AccessCheckMode = iota AccessCheckModeNotSpecifiedRestricted AccessCheckModeNotSpecifiedUnrestricted AccessCheckModeNone )
func (AccessCheckMode) String ¶
func (i AccessCheckMode) String() string
type AddressType ¶
type AddressType struct{}
AddressType represents the address type
func (*AddressType) ContainsFirstLevelInterfaceType ¶
func (*AddressType) ContainsFirstLevelInterfaceType() bool
func (*AddressType) Equal ¶
func (*AddressType) Equal(other Type) bool
func (*AddressType) ID ¶
func (*AddressType) ID() TypeID
func (*AddressType) IsInvalidType ¶
func (*AddressType) IsInvalidType() bool
func (*AddressType) IsResourceType ¶
func (*AddressType) IsResourceType() 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(_ map[*TypeParameter]Type) Type
func (*AddressType) String ¶
func (*AddressType) String() string
func (*AddressType) TypeAnnotationState ¶
func (*AddressType) TypeAnnotationState() TypeAnnotationState
func (*AddressType) Unify ¶
func (*AddressType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type AlwaysFailingNonResourceCastingTypeError ¶
func (*AlwaysFailingNonResourceCastingTypeError) Error ¶
func (e *AlwaysFailingNonResourceCastingTypeError) Error() string
type AlwaysFailingResourceCastingTypeError ¶
func (*AlwaysFailingResourceCastingTypeError) Error ¶
func (e *AlwaysFailingResourceCastingTypeError) Error() string
type AmbiguousRestrictedTypeError ¶
func (*AmbiguousRestrictedTypeError) Error ¶
func (e *AmbiguousRestrictedTypeError) Error() string
type AnyResourceType ¶
type AnyResourceType struct{}
AnyResourceType represents the top type of all resource types
func (*AnyResourceType) ContainsFirstLevelInterfaceType ¶
func (*AnyResourceType) ContainsFirstLevelInterfaceType() bool
func (*AnyResourceType) Equal ¶
func (*AnyResourceType) Equal(other Type) bool
func (*AnyResourceType) ID ¶
func (*AnyResourceType) ID() TypeID
func (*AnyResourceType) IsInvalidType ¶
func (*AnyResourceType) IsInvalidType() bool
func (*AnyResourceType) IsResourceType ¶
func (*AnyResourceType) IsResourceType() bool
func (*AnyResourceType) IsType ¶
func (*AnyResourceType) IsType()
func (*AnyResourceType) QualifiedString ¶
func (*AnyResourceType) QualifiedString() string
func (*AnyResourceType) Resolve ¶
func (t *AnyResourceType) Resolve(_ map[*TypeParameter]Type) Type
func (*AnyResourceType) String ¶
func (*AnyResourceType) String() string
func (*AnyResourceType) TypeAnnotationState ¶
func (*AnyResourceType) TypeAnnotationState() TypeAnnotationState
func (*AnyResourceType) Unify ¶
func (*AnyResourceType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type AnyStructType ¶
type AnyStructType struct{}
AnyStructType represents the top type of all non-resource types
func (*AnyStructType) ContainsFirstLevelInterfaceType ¶
func (*AnyStructType) ContainsFirstLevelInterfaceType() bool
func (*AnyStructType) Equal ¶
func (*AnyStructType) Equal(other Type) bool
func (*AnyStructType) ID ¶
func (*AnyStructType) ID() TypeID
func (*AnyStructType) IsInvalidType ¶
func (*AnyStructType) IsInvalidType() bool
func (*AnyStructType) IsResourceType ¶
func (*AnyStructType) IsResourceType() bool
func (*AnyStructType) IsType ¶
func (*AnyStructType) IsType()
func (*AnyStructType) QualifiedString ¶
func (*AnyStructType) QualifiedString() string
func (*AnyStructType) Resolve ¶
func (t *AnyStructType) Resolve(_ map[*TypeParameter]Type) Type
func (*AnyStructType) String ¶
func (*AnyStructType) String() string
func (*AnyStructType) TypeAnnotationState ¶
func (*AnyStructType) TypeAnnotationState() TypeAnnotationState
func (*AnyStructType) Unify ¶
func (*AnyStructType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type AnyType ¶
type AnyType struct{}
AnyType represents the top type of all types. NOTE: This type is only used internally and not available in programs.
func (*AnyType) ContainsFirstLevelInterfaceType ¶
func (*AnyType) IsInvalidType ¶
func (*AnyType) IsResourceType ¶
func (*AnyType) QualifiedString ¶
func (*AnyType) TypeAnnotationState ¶
func (*AnyType) TypeAnnotationState() TypeAnnotationState
type ArgumentCountError ¶
func (*ArgumentCountError) Error ¶
func (e *ArgumentCountError) Error() string
func (*ArgumentCountError) SecondaryError ¶
func (e *ArgumentCountError) SecondaryError() string
type ArrayType ¶
type ArrayType interface { ValueIndexableType // contains filtered or unexported methods }
type AssignmentToConstantError ¶
func (*AssignmentToConstantError) Error ¶
func (e *AssignmentToConstantError) Error() string
type AssignmentToConstantMemberError ¶
func (*AssignmentToConstantMemberError) Error ¶
func (e *AssignmentToConstantMemberError) Error() string
type AuthAccountType ¶
type AuthAccountType struct{}
func (*AuthAccountType) CanHaveMembers ¶
func (*AuthAccountType) CanHaveMembers() bool
func (*AuthAccountType) ContainsFirstLevelInterfaceType ¶
func (*AuthAccountType) ContainsFirstLevelInterfaceType() bool
func (*AuthAccountType) Equal ¶
func (*AuthAccountType) Equal(other Type) bool
func (*AuthAccountType) ID ¶
func (*AuthAccountType) ID() TypeID
func (*AuthAccountType) IsInvalidType ¶
func (*AuthAccountType) IsInvalidType() bool
func (*AuthAccountType) IsResourceType ¶
func (*AuthAccountType) IsResourceType() bool
func (*AuthAccountType) IsType ¶
func (*AuthAccountType) IsType()
func (*AuthAccountType) QualifiedString ¶
func (*AuthAccountType) QualifiedString() string
func (*AuthAccountType) Resolve ¶
func (t *AuthAccountType) Resolve(_ map[*TypeParameter]Type) Type
func (*AuthAccountType) String ¶
func (*AuthAccountType) String() string
func (*AuthAccountType) TypeAnnotationState ¶
func (*AuthAccountType) TypeAnnotationState() TypeAnnotationState
func (*AuthAccountType) Unify ¶
func (*AuthAccountType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type BeforeExtractor ¶
type BeforeExtractor struct { ExpressionExtractor *ast.ExpressionExtractor // contains filtered or unexported fields }
func NewBeforeExtractor ¶
func NewBeforeExtractor(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 BinaryOperationKind ¶
type BinaryOperationKind uint
const ( BinaryOperationKindUnknown BinaryOperationKind = iota BinaryOperationKindArithmetic BinaryOperationKindNonEqualityComparison BinaryOperationKindBooleanLogic BinaryOperationKindEquality BinaryOperationKindNilCoalescing BinaryOperationKindBitwise )
func (BinaryOperationKind) String ¶
func (i BinaryOperationKind) String() string
type BoolType ¶
type BoolType struct{}
BoolType represents the boolean type
func (*BoolType) ContainsFirstLevelInterfaceType ¶
func (*BoolType) IsInvalidType ¶
func (*BoolType) IsResourceType ¶
func (*BoolType) QualifiedString ¶
func (*BoolType) TypeAnnotationState ¶
func (*BoolType) TypeAnnotationState() TypeAnnotationState
type BranchesResourceInfo ¶
type BranchesResourceInfo struct {
// contains filtered or unexported fields
}
type BranchesResourceInfos ¶
type BranchesResourceInfos map[interface{}]BranchesResourceInfo
func NewBranchesResourceInfos ¶
func NewBranchesResourceInfos(thenResources *Resources, elseResources *Resources) BranchesResourceInfos
func (BranchesResourceInfos) Add ¶
func (infos BranchesResourceInfos) Add( resources *Resources, setValue func(*BranchesResourceInfo, ResourceInfo), )
type CapabilityType ¶
type CapabilityType struct{}
func (*CapabilityType) CanHaveMembers ¶
func (t *CapabilityType) CanHaveMembers() bool
func (*CapabilityType) ContainsFirstLevelInterfaceType ¶
func (*CapabilityType) ContainsFirstLevelInterfaceType() bool
func (*CapabilityType) Equal ¶
func (*CapabilityType) Equal(other Type) bool
func (*CapabilityType) ID ¶
func (*CapabilityType) ID() TypeID
func (*CapabilityType) IsInvalidType ¶
func (*CapabilityType) IsInvalidType() bool
func (*CapabilityType) IsResourceType ¶
func (*CapabilityType) IsResourceType() bool
func (*CapabilityType) IsType ¶
func (*CapabilityType) IsType()
func (*CapabilityType) QualifiedString ¶
func (*CapabilityType) QualifiedString() string
func (*CapabilityType) Resolve ¶
func (t *CapabilityType) Resolve(_ map[*TypeParameter]Type) Type
func (*CapabilityType) String ¶
func (*CapabilityType) String() string
func (*CapabilityType) TypeAnnotationState ¶
func (*CapabilityType) TypeAnnotationState() TypeAnnotationState
func (*CapabilityType) Unify ¶
func (*CapabilityType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type CharacterType ¶
type CharacterType struct{}
func (*CharacterType) ContainsFirstLevelInterfaceType ¶
func (*CharacterType) ContainsFirstLevelInterfaceType() bool
func (*CharacterType) Equal ¶
func (*CharacterType) Equal(other Type) bool
func (*CharacterType) ID ¶
func (*CharacterType) ID() TypeID
func (*CharacterType) IsInvalidType ¶
func (*CharacterType) IsInvalidType() bool
func (*CharacterType) IsResourceType ¶
func (*CharacterType) IsResourceType() bool
func (*CharacterType) IsType ¶
func (*CharacterType) IsType()
func (*CharacterType) QualifiedString ¶
func (*CharacterType) QualifiedString() string
func (*CharacterType) Resolve ¶
func (t *CharacterType) Resolve(_ map[*TypeParameter]Type) Type
func (*CharacterType) String ¶
func (*CharacterType) String() string
func (*CharacterType) TypeAnnotationState ¶
func (*CharacterType) TypeAnnotationState() TypeAnnotationState
func (*CharacterType) Unify ¶
func (*CharacterType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type CheckHandlerFunc ¶ added in v0.2.1
type CheckedFunctionType ¶
type CheckedFunctionType struct { *FunctionType ArgumentExpressionsCheck func(checker *Checker, argumentExpressions []ast.Expression) }
func (*CheckedFunctionType) CheckArgumentExpressions ¶
func (t *CheckedFunctionType) CheckArgumentExpressions(checker *Checker, argumentExpressions []ast.Expression)
type Checker ¶
type Checker struct { Program *ast.Program Location ast.Location PredeclaredValues map[string]ValueDeclaration PredeclaredTypes map[string]TypeDeclaration GlobalValues map[string]*Variable GlobalTypes map[string]*Variable TransactionTypes []*TransactionType Occurrences *Occurrences Elaboration *Elaboration // contains filtered or unexported fields }
func NewChecker ¶
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) EnsureLoaded ¶
func (checker *Checker) EnsureLoaded(location ast.Location, loadProgram func() *ast.Program) (*Checker, *CheckerError)
EnsureLoaded finds or create a checker for the imported program and checks it.
func (*Checker) ResetErrors ¶
func (checker *Checker) ResetErrors()
func (*Checker) SetAllCheckers ¶
func (checker *Checker) SetAllCheckers(allCheckers map[ast.LocationID]*Checker)
SetAllCheckers sets the given map of checkers as the map of all checkers.
func (*Checker) TypeActivationDepth ¶ added in v0.2.0
func (*Checker) UserDefinedValues ¶
func (*Checker) ValueActivationDepth ¶ added in v0.2.0
func (*Checker) VisitArrayExpression ¶
func (checker *Checker) VisitArrayExpression(expression *ast.ArrayExpression) ast.Repr
func (*Checker) VisitAssignmentStatement ¶
func (checker *Checker) VisitAssignmentStatement(assignment *ast.AssignmentStatement) ast.Repr
func (*Checker) VisitBinaryExpression ¶
func (checker *Checker) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr
func (*Checker) VisitBoolExpression ¶
func (checker *Checker) VisitBoolExpression(_ *ast.BoolExpression) ast.Repr
func (*Checker) VisitBreakStatement ¶
func (checker *Checker) VisitBreakStatement(statement *ast.BreakStatement) ast.Repr
func (*Checker) VisitCastingExpression ¶
func (checker *Checker) VisitCastingExpression(expression *ast.CastingExpression) ast.Repr
func (*Checker) VisitCompositeDeclaration ¶
func (checker *Checker) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) ast.Repr
func (*Checker) VisitCondition ¶
func (*Checker) VisitConditionalExpression ¶
func (checker *Checker) VisitConditionalExpression(expression *ast.ConditionalExpression) ast.Repr
func (*Checker) VisitContinueStatement ¶
func (checker *Checker) VisitContinueStatement(statement *ast.ContinueStatement) ast.Repr
func (*Checker) VisitCreateExpression ¶
func (checker *Checker) VisitCreateExpression(expression *ast.CreateExpression) ast.Repr
func (*Checker) VisitDestroyExpression ¶
func (checker *Checker) VisitDestroyExpression(expression *ast.DestroyExpression) (resultType ast.Repr)
func (*Checker) VisitDictionaryExpression ¶
func (checker *Checker) VisitDictionaryExpression(expression *ast.DictionaryExpression) ast.Repr
func (*Checker) VisitEmitStatement ¶
func (checker *Checker) VisitEmitStatement(statement *ast.EmitStatement) ast.Repr
func (*Checker) VisitExpressionStatement ¶
func (checker *Checker) VisitExpressionStatement(statement *ast.ExpressionStatement) ast.Repr
func (*Checker) VisitFieldDeclaration ¶
func (checker *Checker) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr
func (*Checker) VisitFixedPointExpression ¶
func (checker *Checker) VisitFixedPointExpression(expression *ast.FixedPointExpression) ast.Repr
func (*Checker) VisitForStatement ¶
func (checker *Checker) VisitForStatement(statement *ast.ForStatement) ast.Repr
func (*Checker) VisitForceExpression ¶
func (checker *Checker) VisitForceExpression(expression *ast.ForceExpression) ast.Repr
func (*Checker) VisitFunctionBlock ¶
func (checker *Checker) VisitFunctionBlock(functionBlock *ast.FunctionBlock) ast.Repr
func (*Checker) VisitFunctionDeclaration ¶
func (checker *Checker) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr
func (*Checker) VisitFunctionExpression ¶
func (checker *Checker) VisitFunctionExpression(expression *ast.FunctionExpression) ast.Repr
func (*Checker) VisitIdentifierExpression ¶
func (checker *Checker) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr
func (*Checker) VisitIfStatement ¶
func (checker *Checker) VisitIfStatement(statement *ast.IfStatement) ast.Repr
func (*Checker) VisitImportDeclaration ¶
func (checker *Checker) VisitImportDeclaration(_ *ast.ImportDeclaration) ast.Repr
func (*Checker) VisitIndexExpression ¶
func (checker *Checker) VisitIndexExpression(expression *ast.IndexExpression) ast.Repr
func (*Checker) VisitIntegerExpression ¶
func (checker *Checker) VisitIntegerExpression(_ *ast.IntegerExpression) ast.Repr
func (*Checker) VisitInterfaceDeclaration ¶
func (checker *Checker) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) ast.Repr
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) ast.Repr
func (*Checker) VisitMemberExpression ¶
func (checker *Checker) VisitMemberExpression(expression *ast.MemberExpression) ast.Repr
NOTE: only called if the member expression is *not* an assignment
func (*Checker) VisitNilExpression ¶
func (checker *Checker) VisitNilExpression(_ *ast.NilExpression) ast.Repr
func (*Checker) VisitPathExpression ¶
func (checker *Checker) VisitPathExpression(expression *ast.PathExpression) ast.Repr
func (*Checker) VisitReferenceExpression ¶
func (checker *Checker) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) ast.Repr
VisitReferenceExpression checks a reference expression `&t as T`, where `t` is the referenced expression, and `T` is the result type.
func (*Checker) VisitReturnStatement ¶
func (checker *Checker) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr
func (*Checker) VisitStringExpression ¶
func (checker *Checker) VisitStringExpression(_ *ast.StringExpression) ast.Repr
func (*Checker) VisitSwapStatement ¶
func (checker *Checker) VisitSwapStatement(swap *ast.SwapStatement) ast.Repr
func (*Checker) VisitTransactionDeclaration ¶
func (checker *Checker) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) ast.Repr
func (*Checker) VisitUnaryExpression ¶
func (checker *Checker) VisitUnaryExpression(expression *ast.UnaryExpression) ast.Repr
func (*Checker) VisitVariableDeclaration ¶
func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr
func (*Checker) VisitWhileStatement ¶
func (checker *Checker) VisitWhileStatement(statement *ast.WhileStatement) ast.Repr
type CheckerError ¶
type CheckerError struct {
Errors []error
}
func (CheckerError) ChildErrors ¶
func (e CheckerError) ChildErrors() []error
func (CheckerError) Error ¶
func (e CheckerError) Error() string
type CompositeKindMismatchError ¶
type CompositeKindMismatchError struct { ExpectedKind common.CompositeKind ActualKind common.CompositeKind ast.Range }
func (*CompositeKindMismatchError) Error ¶
func (e *CompositeKindMismatchError) Error() string
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 ast.Location Identifier string Kind common.CompositeKind Conformances []*InterfaceType Members map[string]*Member // TODO: add support for overloaded initializers ConstructorParameters []*Parameter ContainerType Type // contains filtered or unexported fields }
func (*CompositeType) AllConformances ¶
func (t *CompositeType) AllConformances() []*InterfaceType
func (*CompositeType) CanHaveMembers ¶
func (t *CompositeType) CanHaveMembers() bool
func (*CompositeType) ConformanceSet ¶
func (t *CompositeType) ConformanceSet() InterfaceSet
func (*CompositeType) ContainsFirstLevelInterfaceType ¶
func (*CompositeType) ContainsFirstLevelInterfaceType() bool
func (*CompositeType) Equal ¶
func (t *CompositeType) Equal(other Type) bool
func (*CompositeType) GetCompositeKind ¶
func (t *CompositeType) GetCompositeKind() common.CompositeKind
func (*CompositeType) GetContainerType ¶
func (t *CompositeType) GetContainerType() Type
func (*CompositeType) GetLocation ¶
func (t *CompositeType) GetLocation() ast.Location
func (*CompositeType) ID ¶
func (t *CompositeType) ID() TypeID
func (*CompositeType) InterfaceType ¶
func (t *CompositeType) InterfaceType() *InterfaceType
func (*CompositeType) IsInvalidType ¶
func (*CompositeType) IsInvalidType() bool
func (*CompositeType) IsResourceType ¶
func (t *CompositeType) IsResourceType() bool
func (*CompositeType) IsType ¶
func (*CompositeType) IsType()
func (*CompositeType) NestedTypes ¶
func (t *CompositeType) NestedTypes() map[string]Type
func (*CompositeType) QualifiedIdentifier ¶
func (t *CompositeType) QualifiedIdentifier() string
func (*CompositeType) QualifiedString ¶
func (t *CompositeType) QualifiedString() string
func (*CompositeType) Resolve ¶
func (t *CompositeType) Resolve(_ map[*TypeParameter]Type) Type
func (*CompositeType) String ¶
func (t *CompositeType) String() string
func (*CompositeType) TypeAnnotationState ¶
func (*CompositeType) TypeAnnotationState() TypeAnnotationState
func (*CompositeType) TypeRequirements ¶
func (t *CompositeType) TypeRequirements() []*CompositeType
func (*CompositeType) Unify ¶
func (*CompositeType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type ConformanceError ¶
type ConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType InitializerMismatch *InitializerMismatch MissingMembers []*Member MemberMismatches []MemberMismatch MissingNestedCompositeTypes []*CompositeType Pos ast.Position InterfaceTypeIsTypeRequirement bool }
func (*ConformanceError) EndPosition ¶
func (e *ConformanceError) EndPosition() 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) StartPosition ¶
func (e *ConformanceError) StartPosition() ast.Position
type ConstantSizedArrayLiteralSizeError ¶
func (*ConstantSizedArrayLiteralSizeError) Error ¶
func (e *ConstantSizedArrayLiteralSizeError) Error() string
func (*ConstantSizedArrayLiteralSizeError) SecondaryError ¶
func (e *ConstantSizedArrayLiteralSizeError) SecondaryError() string
type ConstantSizedType ¶
ConstantSizedType is a constant sized array type
func (*ConstantSizedType) CanHaveMembers ¶
func (t *ConstantSizedType) CanHaveMembers() bool
func (*ConstantSizedType) ContainsFirstLevelInterfaceType ¶
func (t *ConstantSizedType) ContainsFirstLevelInterfaceType() bool
func (*ConstantSizedType) ElementType ¶
func (t *ConstantSizedType) ElementType(_ bool) Type
func (*ConstantSizedType) Equal ¶
func (t *ConstantSizedType) Equal(other Type) bool
func (*ConstantSizedType) ID ¶
func (t *ConstantSizedType) ID() TypeID
func (*ConstantSizedType) IndexingType ¶
func (t *ConstantSizedType) IndexingType() Type
func (*ConstantSizedType) IsInvalidType ¶
func (t *ConstantSizedType) IsInvalidType() bool
func (*ConstantSizedType) IsResourceType ¶
func (t *ConstantSizedType) IsResourceType() bool
func (*ConstantSizedType) IsType ¶
func (*ConstantSizedType) IsType()
func (*ConstantSizedType) QualifiedString ¶
func (t *ConstantSizedType) QualifiedString() string
func (*ConstantSizedType) Resolve ¶
func (t *ConstantSizedType) Resolve(typeParameters map[*TypeParameter]Type) Type
func (*ConstantSizedType) String ¶
func (t *ConstantSizedType) String() string
func (*ConstantSizedType) TypeAnnotationState ¶
func (t *ConstantSizedType) TypeAnnotationState() TypeAnnotationState
func (*ConstantSizedType) Unify ¶
func (t *ConstantSizedType) Unify( other Type, typeParameters map[*TypeParameter]Type, 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 ControlStatementError ¶
type ControlStatementError struct { ControlStatement common.ControlStatement ast.Range }
func (*ControlStatementError) Error ¶
func (e *ControlStatementError) Error() string
type DeclarationKindMismatchError ¶
type DeclarationKindMismatchError struct { ExpectedDeclarationKind common.DeclarationKind ActualDeclarationKind common.DeclarationKind ast.Range }
func (*DeclarationKindMismatchError) Error ¶
func (e *DeclarationKindMismatchError) Error() string
func (*DeclarationKindMismatchError) SecondaryError ¶
func (e *DeclarationKindMismatchError) SecondaryError() string
type DictionaryEntryType ¶
type DictionaryType ¶
func (*DictionaryType) CanHaveMembers ¶
func (t *DictionaryType) CanHaveMembers() bool
func (*DictionaryType) ContainsFirstLevelInterfaceType ¶
func (t *DictionaryType) ContainsFirstLevelInterfaceType() bool
func (*DictionaryType) ElementType ¶
func (t *DictionaryType) ElementType(_ bool) Type
func (*DictionaryType) Equal ¶
func (t *DictionaryType) Equal(other Type) bool
func (*DictionaryType) ID ¶
func (t *DictionaryType) ID() TypeID
func (*DictionaryType) IndexingType ¶
func (t *DictionaryType) IndexingType() Type
func (*DictionaryType) IsInvalidType ¶
func (t *DictionaryType) IsInvalidType() bool
func (*DictionaryType) IsResourceType ¶
func (t *DictionaryType) IsResourceType() bool
func (*DictionaryType) IsType ¶
func (*DictionaryType) IsType()
func (*DictionaryType) QualifiedString ¶
func (t *DictionaryType) QualifiedString() string
func (*DictionaryType) Resolve ¶
func (t *DictionaryType) Resolve(typeParameters map[*TypeParameter]Type) Type
func (*DictionaryType) String ¶
func (t *DictionaryType) String() string
func (*DictionaryType) TypeAnnotationState ¶
func (t *DictionaryType) TypeAnnotationState() TypeAnnotationState
func (*DictionaryType) Unify ¶
func (t *DictionaryType) Unify( other Type, typeParameters map[*TypeParameter]Type, report func(err error), outerRange ast.Range, ) bool
type DuplicateConformanceError ¶
type DuplicateConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType ast.Range }
func (*DuplicateConformanceError) Error ¶
func (e *DuplicateConformanceError) Error() string
type Elaboration ¶
type Elaboration struct { FunctionDeclarationFunctionTypes map[*ast.FunctionDeclaration]*FunctionType VariableDeclarationValueTypes map[*ast.VariableDeclaration]Type VariableDeclarationSecondValueTypes map[*ast.VariableDeclaration]Type VariableDeclarationTargetTypes map[*ast.VariableDeclaration]Type AssignmentStatementValueTypes map[*ast.AssignmentStatement]Type AssignmentStatementTargetTypes map[*ast.AssignmentStatement]Type CompositeDeclarationTypes map[*ast.CompositeDeclaration]*CompositeType SpecialFunctionTypes map[*ast.SpecialFunctionDeclaration]*SpecialFunctionType FunctionExpressionFunctionType map[*ast.FunctionExpression]*FunctionType InvocationExpressionArgumentTypes map[*ast.InvocationExpression][]Type InvocationExpressionParameterTypes map[*ast.InvocationExpression][]Type InvocationExpressionReturnTypes map[*ast.InvocationExpression]Type InterfaceDeclarationTypes map[*ast.InterfaceDeclaration]*InterfaceType CastingStaticValueTypes map[*ast.CastingExpression]Type CastingTargetTypes map[*ast.CastingExpression]Type ReturnStatementValueTypes map[*ast.ReturnStatement]Type ReturnStatementReturnTypes map[*ast.ReturnStatement]Type BinaryExpressionResultTypes map[*ast.BinaryExpression]Type BinaryExpressionRightTypes map[*ast.BinaryExpression]Type MemberExpressionMemberInfos map[*ast.MemberExpression]MemberInfo ArrayExpressionArgumentTypes map[*ast.ArrayExpression][]Type ArrayExpressionElementType map[*ast.ArrayExpression]Type DictionaryExpressionType map[*ast.DictionaryExpression]*DictionaryType DictionaryExpressionEntryTypes map[*ast.DictionaryExpression][]DictionaryEntryType TransactionDeclarationTypes map[*ast.TransactionDeclaration]*TransactionType // NOTE: not indexed by `ast.Type`, as IndexExpression might index // with "type" which is an expression, i.e., an IdentifierExpression. // See `Checker.visitTypeIndexingExpression` IndexExpressionIndexingTypes map[*ast.IndexExpression]Type SwapStatementLeftTypes map[*ast.SwapStatement]Type SwapStatementRightTypes map[*ast.SwapStatement]Type IsTypeIndexExpression map[*ast.IndexExpression]bool IsResourceMovingStorageIndexExpression map[*ast.IndexExpression]bool 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 // Keyed by qualified identifier CompositeTypes map[TypeID]*CompositeType InterfaceTypes map[TypeID]*InterfaceType InvocationExpressionTypeParameterTypes map[*ast.InvocationExpression]map[*TypeParameter]Type }
func NewElaboration ¶
func NewElaboration() *Elaboration
type EmitImportedEventError ¶
func (*EmitImportedEventError) Error ¶
func (e *EmitImportedEventError) Error() string
type EmitNonEventError ¶
func (*EmitNonEventError) Error ¶
func (e *EmitNonEventError) Error() string
type FieldUninitializedError ¶
func (*FieldUninitializedError) EndPosition ¶
func (e *FieldUninitializedError) EndPosition() ast.Position
func (*FieldUninitializedError) Error ¶
func (e *FieldUninitializedError) Error() string
func (*FieldUninitializedError) SecondaryError ¶
func (e *FieldUninitializedError) SecondaryError() string
func (*FieldUninitializedError) StartPosition ¶
func (e *FieldUninitializedError) StartPosition() ast.Position
type Fix64Type ¶
type Fix64Type struct{}
Fix64Type represents the 64-bit signed decimal fixed-point type `Fix64` which has a scale of Fix64Scale, and checks for overflow and underflow
func (*Fix64Type) ContainsFirstLevelInterfaceType ¶
func (*Fix64Type) IsInvalidType ¶
func (*Fix64Type) IsResourceType ¶
func (*Fix64Type) MaxFractional ¶
func (*Fix64Type) MinFractional ¶
func (*Fix64Type) QualifiedString ¶
func (*Fix64Type) TypeAnnotationState ¶
func (*Fix64Type) TypeAnnotationState() TypeAnnotationState
type FixedPointType ¶
type FixedPointType struct{}
FixedPointType represents the super-type of all fixed-point types
func (*FixedPointType) ContainsFirstLevelInterfaceType ¶
func (*FixedPointType) ContainsFirstLevelInterfaceType() bool
func (*FixedPointType) Equal ¶
func (*FixedPointType) Equal(other Type) bool
func (*FixedPointType) ID ¶
func (*FixedPointType) ID() TypeID
func (*FixedPointType) IsInvalidType ¶
func (*FixedPointType) IsInvalidType() bool
func (*FixedPointType) IsResourceType ¶
func (*FixedPointType) IsResourceType() bool
func (*FixedPointType) IsType ¶
func (*FixedPointType) IsType()
func (*FixedPointType) MaxInt ¶
func (*FixedPointType) MaxInt() *big.Int
func (*FixedPointType) MinInt ¶
func (*FixedPointType) MinInt() *big.Int
func (*FixedPointType) QualifiedString ¶
func (*FixedPointType) QualifiedString() string
func (*FixedPointType) Resolve ¶
func (t *FixedPointType) Resolve(_ map[*TypeParameter]Type) Type
func (*FixedPointType) String ¶
func (*FixedPointType) String() string
func (*FixedPointType) TypeAnnotationState ¶
func (*FixedPointType) TypeAnnotationState() TypeAnnotationState
func (*FixedPointType) Unify ¶
func (*FixedPointType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type FractionalRangedType ¶
type FunctionActivation ¶
type FunctionActivation struct { ReturnType Type Loops int ValueActivationDepth int ReturnInfo *ReturnInfo ReportedDeadCode bool InitializationInfo *InitializationInfo }
func (FunctionActivation) InLoop ¶
func (a FunctionActivation) InLoop() bool
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)
func (*FunctionActivations) EnterLoop ¶
func (a *FunctionActivations) EnterLoop()
func (*FunctionActivations) IsLocal ¶
func (a *FunctionActivations) IsLocal() bool
func (*FunctionActivations) LeaveFunction ¶
func (a *FunctionActivations) LeaveFunction()
func (*FunctionActivations) LeaveLoop ¶
func (a *FunctionActivations) LeaveLoop()
func (*FunctionActivations) WithFunction ¶
func (a *FunctionActivations) WithFunction(functionType *FunctionType, valueActivationDepth int, f func())
func (*FunctionActivations) WithLoop ¶
func (a *FunctionActivations) WithLoop(f func())
type FunctionExpressionInConditionError ¶
func (*FunctionExpressionInConditionError) Error ¶
func (e *FunctionExpressionInConditionError) Error() string
type FunctionType ¶
type FunctionType struct { TypeParameters []*TypeParameter Parameters []*Parameter ReturnTypeAnnotation *TypeAnnotation RequiredArgumentCount *int }
FunctionType is a monomorphic function type.
func (*FunctionType) ArgumentLabels ¶
func (t *FunctionType) ArgumentLabels() (argumentLabels []string)
func (*FunctionType) CheckArgumentExpressions ¶
func (*FunctionType) CheckArgumentExpressions(_ *Checker, _ []ast.Expression)
func (*FunctionType) ContainsFirstLevelInterfaceType ¶
func (t *FunctionType) ContainsFirstLevelInterfaceType() bool
func (*FunctionType) Equal ¶
func (t *FunctionType) Equal(other Type) bool
NOTE: parameter names and argument labels are intentionally *not* considered!
func (*FunctionType) EqualIncludingArgumentLabels ¶
func (t *FunctionType) EqualIncludingArgumentLabels(other Type) bool
NOTE: argument labels *are* considered! parameter names are intentionally *not* considered!
func (*FunctionType) ID ¶
func (t *FunctionType) ID() TypeID
NOTE: parameter names and argument labels are *not* part of the ID!
func (*FunctionType) InvocationFunctionType ¶
func (t *FunctionType) InvocationFunctionType() *FunctionType
func (*FunctionType) IsInvalidType ¶
func (t *FunctionType) IsInvalidType() bool
func (*FunctionType) IsResourceType ¶
func (*FunctionType) IsResourceType() bool
func (*FunctionType) IsType ¶
func (*FunctionType) IsType()
func (*FunctionType) QualifiedString ¶
func (t *FunctionType) QualifiedString() string
func (*FunctionType) Resolve ¶
func (t *FunctionType) Resolve(_ map[*TypeParameter]Type) Type
func (*FunctionType) String ¶
func (t *FunctionType) String() string
func (*FunctionType) TypeAnnotationState ¶
func (t *FunctionType) TypeAnnotationState() TypeAnnotationState
func (*FunctionType) Unify ¶
func (*FunctionType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type GenericType ¶
type GenericType struct {
TypeParameter *TypeParameter
}
GenericType
func (*GenericType) ContainsFirstLevelInterfaceType ¶
func (t *GenericType) ContainsFirstLevelInterfaceType() bool
func (*GenericType) Equal ¶
func (t *GenericType) Equal(other Type) bool
func (*GenericType) ID ¶
func (t *GenericType) ID() TypeID
func (*GenericType) IsInvalidType ¶
func (t *GenericType) IsInvalidType() bool
func (*GenericType) IsResourceType ¶
func (t *GenericType) IsResourceType() bool
func (*GenericType) IsType ¶
func (*GenericType) IsType()
func (*GenericType) QualifiedString ¶
func (t *GenericType) QualifiedString() string
func (*GenericType) Resolve ¶
func (t *GenericType) Resolve(typeParameters map[*TypeParameter]Type) Type
func (*GenericType) String ¶
func (t *GenericType) String() string
func (*GenericType) TypeAnnotationState ¶
func (t *GenericType) TypeAnnotationState() TypeAnnotationState
func (*GenericType) Unify ¶
func (t *GenericType) Unify( other Type, typeParameters map[*TypeParameter]Type, report func(err error), outerRange ast.Range, ) bool
type ImportedProgramError ¶
type ImportedProgramError struct { CheckerError *CheckerError ImportLocation ast.Location Pos ast.Position }
func (*ImportedProgramError) ChildErrors ¶
func (e *ImportedProgramError) ChildErrors() []error
func (*ImportedProgramError) EndPosition ¶
func (e *ImportedProgramError) EndPosition() ast.Position
func (*ImportedProgramError) Error ¶
func (e *ImportedProgramError) Error() string
func (*ImportedProgramError) StartPosition ¶
func (e *ImportedProgramError) StartPosition() ast.Position
type IncorrectArgumentLabelError ¶
type IncorrectArgumentLabelError struct { ExpectedArgumentLabel string ActualArgumentLabel string ast.Range }
func (*IncorrectArgumentLabelError) Error ¶
func (e *IncorrectArgumentLabelError) Error() string
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) SecondaryError ¶
func (e *IncorrectTransferOperationError) SecondaryError() string
type InitializationInfo ¶
type InitializationInfo struct { ContainerType Type FieldMembers map[*Member]*ast.FieldDeclaration InitializedFieldMembers *MemberSet }
func NewInitializationInfo ¶
func NewInitializationInfo( containerType Type, fieldMembers map[*Member]*ast.FieldDeclaration, ) *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 Int128Type ¶
type Int128Type struct{}
Int128Type represents the 128-bit signed integer type `Int128`
func (*Int128Type) ContainsFirstLevelInterfaceType ¶
func (*Int128Type) ContainsFirstLevelInterfaceType() bool
func (*Int128Type) Equal ¶
func (*Int128Type) Equal(other Type) bool
func (*Int128Type) ID ¶
func (*Int128Type) ID() TypeID
func (*Int128Type) IsInvalidType ¶
func (*Int128Type) IsInvalidType() bool
func (*Int128Type) IsResourceType ¶
func (*Int128Type) IsResourceType() bool
func (*Int128Type) IsType ¶
func (*Int128Type) IsType()
func (*Int128Type) MaxInt ¶
func (*Int128Type) MaxInt() *big.Int
func (*Int128Type) MinInt ¶
func (*Int128Type) MinInt() *big.Int
func (*Int128Type) QualifiedString ¶
func (*Int128Type) QualifiedString() string
func (*Int128Type) Resolve ¶
func (t *Int128Type) Resolve(_ map[*TypeParameter]Type) Type
func (*Int128Type) String ¶
func (*Int128Type) String() string
func (*Int128Type) TypeAnnotationState ¶
func (*Int128Type) TypeAnnotationState() TypeAnnotationState
func (*Int128Type) Unify ¶
func (*Int128Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Int16Type ¶
type Int16Type struct{}
Int16Type represents the 16-bit signed integer type `Int16`
func (*Int16Type) ContainsFirstLevelInterfaceType ¶
func (*Int16Type) IsInvalidType ¶
func (*Int16Type) IsResourceType ¶
func (*Int16Type) QualifiedString ¶
func (*Int16Type) TypeAnnotationState ¶
func (*Int16Type) TypeAnnotationState() TypeAnnotationState
type Int256Type ¶
type Int256Type struct{}
Int256Type represents the 256-bit signed integer type `Int256`
func (*Int256Type) ContainsFirstLevelInterfaceType ¶
func (*Int256Type) ContainsFirstLevelInterfaceType() bool
func (*Int256Type) Equal ¶
func (*Int256Type) Equal(other Type) bool
func (*Int256Type) ID ¶
func (*Int256Type) ID() TypeID
func (*Int256Type) IsInvalidType ¶
func (*Int256Type) IsInvalidType() bool
func (*Int256Type) IsResourceType ¶
func (*Int256Type) IsResourceType() bool
func (*Int256Type) IsType ¶
func (*Int256Type) IsType()
func (*Int256Type) MaxInt ¶
func (*Int256Type) MaxInt() *big.Int
func (*Int256Type) MinInt ¶
func (*Int256Type) MinInt() *big.Int
func (*Int256Type) QualifiedString ¶
func (*Int256Type) QualifiedString() string
func (*Int256Type) Resolve ¶
func (t *Int256Type) Resolve(_ map[*TypeParameter]Type) Type
func (*Int256Type) String ¶
func (*Int256Type) String() string
func (*Int256Type) TypeAnnotationState ¶
func (*Int256Type) TypeAnnotationState() TypeAnnotationState
func (*Int256Type) Unify ¶
func (*Int256Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Int32Type ¶
type Int32Type struct{}
Int32Type represents the 32-bit signed integer type `Int32`
func (*Int32Type) ContainsFirstLevelInterfaceType ¶
func (*Int32Type) IsInvalidType ¶
func (*Int32Type) IsResourceType ¶
func (*Int32Type) QualifiedString ¶
func (*Int32Type) TypeAnnotationState ¶
func (*Int32Type) TypeAnnotationState() TypeAnnotationState
type Int64Type ¶
type Int64Type struct{}
Int64Type represents the 64-bit signed integer type `Int64`
func (*Int64Type) ContainsFirstLevelInterfaceType ¶
func (*Int64Type) IsInvalidType ¶
func (*Int64Type) IsResourceType ¶
func (*Int64Type) QualifiedString ¶
func (*Int64Type) TypeAnnotationState ¶
func (*Int64Type) TypeAnnotationState() TypeAnnotationState
type Int8Type ¶
type Int8Type struct{}
func (*Int8Type) ContainsFirstLevelInterfaceType ¶
func (*Int8Type) IsInvalidType ¶
func (*Int8Type) IsResourceType ¶
func (*Int8Type) QualifiedString ¶
func (*Int8Type) TypeAnnotationState ¶
func (*Int8Type) TypeAnnotationState() TypeAnnotationState
type IntType ¶
type IntType struct{}
IntType represents the arbitrary-precision integer type `Int`
func (*IntType) ContainsFirstLevelInterfaceType ¶
func (*IntType) IsInvalidType ¶
func (*IntType) IsResourceType ¶
func (*IntType) QualifiedString ¶
func (*IntType) TypeAnnotationState ¶
func (*IntType) TypeAnnotationState() TypeAnnotationState
type IntegerRangedType ¶
type IntegerType ¶
type IntegerType struct{}
IntegerType represents the super-type of all integer types
func (*IntegerType) ContainsFirstLevelInterfaceType ¶
func (*IntegerType) ContainsFirstLevelInterfaceType() bool
func (*IntegerType) Equal ¶
func (*IntegerType) Equal(other Type) bool
func (*IntegerType) ID ¶
func (*IntegerType) ID() TypeID
func (*IntegerType) IsInvalidType ¶
func (*IntegerType) IsInvalidType() bool
func (*IntegerType) IsResourceType ¶
func (*IntegerType) IsResourceType() bool
func (*IntegerType) IsType ¶
func (*IntegerType) IsType()
func (*IntegerType) MaxInt ¶
func (*IntegerType) MaxInt() *big.Int
func (*IntegerType) MinInt ¶
func (*IntegerType) MinInt() *big.Int
func (*IntegerType) QualifiedString ¶
func (*IntegerType) QualifiedString() string
func (*IntegerType) Resolve ¶
func (t *IntegerType) Resolve(_ map[*TypeParameter]Type) Type
func (*IntegerType) String ¶
func (*IntegerType) String() string
func (*IntegerType) TypeAnnotationState ¶
func (*IntegerType) TypeAnnotationState() TypeAnnotationState
func (*IntegerType) Unify ¶
func (*IntegerType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type InterfaceSet ¶
type InterfaceSet map[*InterfaceType]struct{}
func (InterfaceSet) IsSubsetOf ¶
func (s InterfaceSet) IsSubsetOf(other InterfaceSet) bool
type InterfaceType ¶
type InterfaceType struct { Location ast.Location Identifier string CompositeKind common.CompositeKind Members map[string]*Member // TODO: add support for overloaded initializers InitializerParameters []*Parameter ContainerType Type // contains filtered or unexported fields }
func (*InterfaceType) CanHaveMembers ¶
func (t *InterfaceType) CanHaveMembers() bool
func (*InterfaceType) ContainsFirstLevelInterfaceType ¶
func (t *InterfaceType) ContainsFirstLevelInterfaceType() bool
func (*InterfaceType) Equal ¶
func (t *InterfaceType) Equal(other Type) bool
func (*InterfaceType) GetCompositeKind ¶
func (t *InterfaceType) GetCompositeKind() common.CompositeKind
func (*InterfaceType) GetContainerType ¶
func (t *InterfaceType) GetContainerType() Type
func (*InterfaceType) GetLocation ¶
func (t *InterfaceType) GetLocation() ast.Location
func (*InterfaceType) ID ¶
func (t *InterfaceType) ID() TypeID
func (*InterfaceType) IsInvalidType ¶
func (t *InterfaceType) IsInvalidType() bool
func (*InterfaceType) IsResourceType ¶
func (t *InterfaceType) IsResourceType() bool
func (*InterfaceType) IsType ¶
func (*InterfaceType) IsType()
func (*InterfaceType) NestedTypes ¶
func (t *InterfaceType) NestedTypes() map[string]Type
func (*InterfaceType) QualifiedIdentifier ¶
func (t *InterfaceType) QualifiedIdentifier() string
func (*InterfaceType) QualifiedString ¶
func (t *InterfaceType) QualifiedString() string
func (*InterfaceType) Resolve ¶
func (t *InterfaceType) Resolve(_ map[*TypeParameter]Type) Type
func (*InterfaceType) String ¶
func (t *InterfaceType) String() string
func (*InterfaceType) TypeAnnotationState ¶
func (*InterfaceType) TypeAnnotationState() TypeAnnotationState
func (*InterfaceType) Unify ¶
func (*InterfaceType) Unify(_ Type, _ map[*TypeParameter]Type, _ 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
type InvalidAccessModifierError ¶
type InvalidAccessModifierError struct { DeclarationKind common.DeclarationKind Explanation string Access ast.Access Pos ast.Position }
func (*InvalidAccessModifierError) EndPosition ¶
func (e *InvalidAccessModifierError) EndPosition() ast.Position
func (*InvalidAccessModifierError) Error ¶
func (e *InvalidAccessModifierError) Error() string
func (*InvalidAccessModifierError) StartPosition ¶
func (e *InvalidAccessModifierError) StartPosition() ast.Position
type InvalidAddressLiteralError ¶
func (*InvalidAddressLiteralError) Error ¶
func (e *InvalidAddressLiteralError) Error() string
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) SecondaryError ¶
func (e *InvalidAssignmentAccessError) SecondaryError() string
type InvalidAssignmentTargetError ¶
func (*InvalidAssignmentTargetError) Error ¶
func (e *InvalidAssignmentTargetError) Error() string
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) 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
type InvalidCharacterLiteralError ¶
func (*InvalidCharacterLiteralError) Error ¶
func (e *InvalidCharacterLiteralError) Error() string
func (*InvalidCharacterLiteralError) SecondaryError ¶
func (e *InvalidCharacterLiteralError) SecondaryError() string
type InvalidConformanceError ¶
func (*InvalidConformanceError) EndPosition ¶
func (e *InvalidConformanceError) EndPosition() ast.Position
func (*InvalidConformanceError) Error ¶
func (e *InvalidConformanceError) Error() string
func (*InvalidConformanceError) StartPosition ¶
func (e *InvalidConformanceError) StartPosition() ast.Position
type InvalidConstantSizedTypeBaseError ¶
func (*InvalidConstantSizedTypeBaseError) Error ¶
func (e *InvalidConstantSizedTypeBaseError) Error() string
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) SecondaryError ¶
func (e *InvalidConstantSizedTypeSizeError) SecondaryError() string
type InvalidConstructionError ¶
func (*InvalidConstructionError) Error ¶
func (e *InvalidConstructionError) Error() string
type InvalidDeclarationError ¶
type InvalidDeclarationError struct { Identifier string Kind common.DeclarationKind ast.Range }
func (*InvalidDeclarationError) Error ¶
func (e *InvalidDeclarationError) Error() string
type InvalidDestructionError ¶
func (*InvalidDestructionError) Error ¶
func (e *InvalidDestructionError) Error() string
type InvalidDestructorError ¶
func (*InvalidDestructorError) Error ¶
func (e *InvalidDestructorError) Error() string
type InvalidDestructorParametersError ¶
func (*InvalidDestructorParametersError) Error ¶
func (e *InvalidDestructorParametersError) Error() string
func (*InvalidDestructorParametersError) SecondaryError ¶
func (e *InvalidDestructorParametersError) SecondaryError() string
type InvalidDictionaryKeyTypeError ¶
func (*InvalidDictionaryKeyTypeError) Error ¶
func (e *InvalidDictionaryKeyTypeError) Error() string
type InvalidEventParameterTypeError ¶
func (*InvalidEventParameterTypeError) Error ¶
func (e *InvalidEventParameterTypeError) Error() string
type InvalidEventUsageError ¶
func (*InvalidEventUsageError) Error ¶
func (e *InvalidEventUsageError) Error() string
type InvalidFailableResourceDowncastOutsideOptionalBindingError ¶
func (*InvalidFailableResourceDowncastOutsideOptionalBindingError) Error ¶
func (e *InvalidFailableResourceDowncastOutsideOptionalBindingError) Error() string
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) SecondaryError ¶
func (e *InvalidFixedPointLiteralRangeError) SecondaryError() string
type InvalidFixedPointLiteralScaleError ¶
func (*InvalidFixedPointLiteralScaleError) Error ¶
func (e *InvalidFixedPointLiteralScaleError) Error() string
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() ast.Position
func (*InvalidImplementationError) Error ¶
func (e *InvalidImplementationError) Error() string
func (*InvalidImplementationError) StartPosition ¶
func (e *InvalidImplementationError) StartPosition() ast.Position
type InvalidIndexingError ¶
func (*InvalidIndexingError) Error ¶
func (e *InvalidIndexingError) Error() string
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) SecondaryError ¶
func (e *InvalidIntegerLiteralRangeError) SecondaryError() string
type InvalidInterfaceTypeError ¶
func (*InvalidInterfaceTypeError) Error ¶
func (e *InvalidInterfaceTypeError) Error() string
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() ast.Position
func (*InvalidMoveError) Error ¶
func (e *InvalidMoveError) Error() string
func (*InvalidMoveError) StartPosition ¶
func (e *InvalidMoveError) StartPosition() ast.Position
type InvalidMoveOperationError ¶
func (*InvalidMoveOperationError) Error ¶
func (e *InvalidMoveOperationError) Error() string
func (*InvalidMoveOperationError) SecondaryError ¶
func (e *InvalidMoveOperationError) SecondaryError() string
type InvalidNameError ¶
func (*InvalidNameError) EndPosition ¶
func (e *InvalidNameError) EndPosition() ast.Position
func (*InvalidNameError) Error ¶
func (e *InvalidNameError) Error() string
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
type InvalidNestedResourceMoveError ¶
func (*InvalidNestedResourceMoveError) EndPosition ¶
func (e *InvalidNestedResourceMoveError) EndPosition() ast.Position
func (*InvalidNestedResourceMoveError) Error ¶
func (e *InvalidNestedResourceMoveError) Error() string
func (*InvalidNestedResourceMoveError) StartPosition ¶
func (e *InvalidNestedResourceMoveError) StartPosition() ast.Position
type InvalidNestedTypeError ¶
type InvalidNestedTypeError struct {
Type *ast.NominalType
}
func (*InvalidNestedTypeError) EndPosition ¶
func (e *InvalidNestedTypeError) EndPosition() ast.Position
func (*InvalidNestedTypeError) Error ¶
func (e *InvalidNestedTypeError) Error() string
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
type InvalidOptionalChainingError ¶
func (*InvalidOptionalChainingError) Error ¶
func (e *InvalidOptionalChainingError) Error() string
type InvalidPathDomainError ¶
func (*InvalidPathDomainError) Error ¶
func (e *InvalidPathDomainError) Error() string
func (*InvalidPathDomainError) SecondaryError ¶
func (e *InvalidPathDomainError) SecondaryError() string
type InvalidResourceAnnotationError ¶
func (*InvalidResourceAnnotationError) Error ¶
func (e *InvalidResourceAnnotationError) Error() string
type InvalidResourceArrayMemberError ¶
type InvalidResourceArrayMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceArrayMemberError) Error ¶
func (e *InvalidResourceArrayMemberError) Error() string
type InvalidResourceAssignmentError ¶
func (*InvalidResourceAssignmentError) Error ¶
func (e *InvalidResourceAssignmentError) Error() string
type InvalidResourceCreationError ¶
func (*InvalidResourceCreationError) Error ¶
func (e *InvalidResourceCreationError) Error() string
type InvalidResourceDictionaryMemberError ¶
type InvalidResourceDictionaryMemberError struct { Name string DeclarationKind common.DeclarationKind ast.Range }
func (*InvalidResourceDictionaryMemberError) Error ¶
func (e *InvalidResourceDictionaryMemberError) Error() string
type InvalidResourceFieldError ¶
type InvalidResourceFieldError struct { Name string CompositeKind common.CompositeKind Pos ast.Position }
func (*InvalidResourceFieldError) EndPosition ¶
func (e *InvalidResourceFieldError) EndPosition() ast.Position
func (*InvalidResourceFieldError) Error ¶
func (e *InvalidResourceFieldError) Error() string
func (*InvalidResourceFieldError) StartPosition ¶
func (e *InvalidResourceFieldError) StartPosition() ast.Position
type InvalidResourceTransactionParameterError ¶
func (*InvalidResourceTransactionParameterError) Error ¶
func (e *InvalidResourceTransactionParameterError) Error() string
type InvalidRestrictedTypeError ¶
func (*InvalidRestrictedTypeError) Error ¶
func (e *InvalidRestrictedTypeError) Error() string
type InvalidRestrictedTypeMemberAccessError ¶
func (*InvalidRestrictedTypeMemberAccessError) Error ¶
func (e *InvalidRestrictedTypeMemberAccessError) Error() string
type InvalidRestrictionTypeDuplicateError ¶
type InvalidRestrictionTypeDuplicateError struct { Type *InterfaceType ast.Range }
func (*InvalidRestrictionTypeDuplicateError) Error ¶
func (e *InvalidRestrictionTypeDuplicateError) Error() string
type InvalidRestrictionTypeError ¶
func (*InvalidRestrictionTypeError) Error ¶
func (e *InvalidRestrictionTypeError) Error() string
type InvalidReturnValueError ¶
func (*InvalidReturnValueError) Error ¶
func (e *InvalidReturnValueError) Error() string
type InvalidSelfInvalidationError ¶
type InvalidSelfInvalidationError struct { InvalidationKind ResourceInvalidationKind StartPos ast.Position EndPos ast.Position }
func (*InvalidSelfInvalidationError) EndPosition ¶
func (e *InvalidSelfInvalidationError) EndPosition() ast.Position
func (*InvalidSelfInvalidationError) Error ¶
func (e *InvalidSelfInvalidationError) Error() string
func (*InvalidSelfInvalidationError) StartPosition ¶
func (e *InvalidSelfInvalidationError) StartPosition() ast.Position
type InvalidSwapExpressionError ¶
type InvalidSwapExpressionError struct { Side common.OperandSide ast.Range }
func (*InvalidSwapExpressionError) Error ¶
func (e *InvalidSwapExpressionError) Error() string
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
type InvalidTransactionBlockError ¶
func (*InvalidTransactionBlockError) EndPosition ¶
func (e *InvalidTransactionBlockError) EndPosition() ast.Position
func (*InvalidTransactionBlockError) Error ¶
func (e *InvalidTransactionBlockError) Error() string
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() ast.Position
func (*InvalidTransactionFieldAccessModifierError) Error ¶
func (e *InvalidTransactionFieldAccessModifierError) Error() string
func (*InvalidTransactionFieldAccessModifierError) StartPosition ¶
func (e *InvalidTransactionFieldAccessModifierError) StartPosition() ast.Position
type InvalidTransactionPrepareParameterTypeError ¶
func (*InvalidTransactionPrepareParameterTypeError) Error ¶
func (e *InvalidTransactionPrepareParameterTypeError) Error() string
type InvalidType ¶
type InvalidType struct{}
InvalidType represents a type that is invalid. It is the result of type checking failing and can't be expressed in programs.
func (*InvalidType) ContainsFirstLevelInterfaceType ¶
func (*InvalidType) ContainsFirstLevelInterfaceType() bool
func (*InvalidType) Equal ¶
func (*InvalidType) Equal(other Type) bool
func (*InvalidType) ID ¶
func (*InvalidType) ID() TypeID
func (*InvalidType) IsInvalidType ¶
func (*InvalidType) IsInvalidType() bool
func (*InvalidType) IsResourceType ¶
func (*InvalidType) IsResourceType() bool
func (*InvalidType) IsType ¶
func (*InvalidType) IsType()
func (*InvalidType) QualifiedString ¶
func (*InvalidType) QualifiedString() string
func (*InvalidType) Resolve ¶
func (t *InvalidType) Resolve(_ map[*TypeParameter]Type) Type
func (*InvalidType) String ¶
func (*InvalidType) String() string
func (*InvalidType) TypeAnnotationState ¶
func (*InvalidType) TypeAnnotationState() TypeAnnotationState
func (*InvalidType) Unify ¶
func (*InvalidType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type InvalidTypeArgumentCountError ¶
type InvalidTypeArgumentCountError struct { TypeParameterCount int TypeArgumentCount int ast.Range }
func (*InvalidTypeArgumentCountError) Error ¶
func (e *InvalidTypeArgumentCountError) Error() string
func (*InvalidTypeArgumentCountError) SecondaryError ¶
func (e *InvalidTypeArgumentCountError) SecondaryError() string
type InvalidTypeIndexingError ¶
func (*InvalidTypeIndexingError) Error ¶
func (e *InvalidTypeIndexingError) Error() string
func (*InvalidTypeIndexingError) SecondaryError ¶
func (e *InvalidTypeIndexingError) 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) SecondaryError ¶
func (e *InvalidUnaryOperandError) SecondaryError() string
type InvalidVariableKindError ¶
type InvalidVariableKindError struct { Kind ast.VariableKind ast.Range }
func (*InvalidVariableKindError) Error ¶
func (e *InvalidVariableKindError) Error() string
type InvokableType ¶
type InvokableType interface { Type InvocationFunctionType() *FunctionType CheckArgumentExpressions(checker *Checker, argumentExpressions []ast.Expression) ArgumentLabels() []string }
type LocatedType ¶
LocatedType is a type which has a location
type Member ¶
type Member struct { ContainerType Type Access ast.Access Identifier ast.Identifier TypeAnnotation *TypeAnnotation DeclarationKind common.DeclarationKind VariableKind ast.VariableKind ArgumentLabels []string // Predeclared fields can be considered initialized Predeclared bool // IgnoreInSerialization fields are ignored in serialization IgnoreInSerialization bool }
func NewPublicFunctionMember ¶
func NewPublicFunctionMember(containerType Type, identifier string, invokableType InvokableType) *Member
type MemberAccessibleType ¶
type MemberAccessibleType interface { Type CanHaveMembers() bool GetMember(identifier string, targetRange ast.Range, report func(error)) *Member }
MemberAccessibleType is a type which might have members
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 MemberSet ¶
type MemberSet struct {
// contains filtered or unexported fields
}
MemberSet is an immutable set of field assignments.
func (*MemberSet) Intersection ¶
Intersection returns a new set containing all members that exist in both sets.
type MissingAccessModifierError ¶
type MissingAccessModifierError struct { DeclarationKind common.DeclarationKind Explanation string Pos ast.Position }
func (*MissingAccessModifierError) EndPosition ¶
func (e *MissingAccessModifierError) EndPosition() ast.Position
func (*MissingAccessModifierError) Error ¶
func (e *MissingAccessModifierError) Error() string
func (*MissingAccessModifierError) StartPosition ¶
func (e *MissingAccessModifierError) StartPosition() ast.Position
type MissingArgumentLabelError ¶
func (*MissingArgumentLabelError) Error ¶
func (e *MissingArgumentLabelError) Error() string
type MissingConformanceError ¶
type MissingConformanceError struct { CompositeType *CompositeType InterfaceType *InterfaceType ast.Range }
func (*MissingConformanceError) Error ¶
func (e *MissingConformanceError) Error() string
type MissingCreateError ¶
func (*MissingCreateError) Error ¶
func (e *MissingCreateError) Error() string
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() ast.Position
func (*MissingDestructorError) Error ¶
func (e *MissingDestructorError) Error() string
func (*MissingDestructorError) StartPosition ¶
func (e *MissingDestructorError) StartPosition() ast.Position
type MissingFunctionBodyError ¶
func (*MissingFunctionBodyError) EndPosition ¶
func (e *MissingFunctionBodyError) EndPosition() ast.Position
func (*MissingFunctionBodyError) Error ¶
func (e *MissingFunctionBodyError) Error() string
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() ast.Position
func (*MissingInitializerError) Error ¶
func (e *MissingInitializerError) Error() string
func (*MissingInitializerError) StartPosition ¶
func (e *MissingInitializerError) StartPosition() ast.Position
type MissingLocationError ¶
type MissingLocationError struct{}
func (*MissingLocationError) Error ¶
func (e *MissingLocationError) Error() string
type MissingMoveOperationError ¶
func (*MissingMoveOperationError) EndPosition ¶
func (e *MissingMoveOperationError) EndPosition() ast.Position
func (*MissingMoveOperationError) Error ¶
func (e *MissingMoveOperationError) Error() string
func (*MissingMoveOperationError) StartPosition ¶
func (e *MissingMoveOperationError) StartPosition() ast.Position
type MissingResourceAnnotationError ¶
func (*MissingResourceAnnotationError) Error ¶
func (e *MissingResourceAnnotationError) Error() string
type MissingReturnStatementError ¶
func (*MissingReturnStatementError) Error ¶
func (e *MissingReturnStatementError) Error() string
type NeverType ¶
type NeverType struct{}
NeverType represents the bottom type
func (*NeverType) ContainsFirstLevelInterfaceType ¶
func (*NeverType) IsInvalidType ¶
func (*NeverType) IsResourceType ¶
func (*NeverType) QualifiedString ¶
func (*NeverType) TypeAnnotationState ¶
func (*NeverType) TypeAnnotationState() TypeAnnotationState
type NonOptionalForceError ¶
func (*NonOptionalForceError) Error ¶
func (e *NonOptionalForceError) Error() string
type NonReferenceTypeReferenceError ¶
func (*NonReferenceTypeReferenceError) Error ¶
func (e *NonReferenceTypeReferenceError) Error() string
func (*NonReferenceTypeReferenceError) SecondaryError ¶
func (e *NonReferenceTypeReferenceError) SecondaryError() string
type NonResourceTypeError ¶
func (*NonResourceTypeError) Error ¶
func (e *NonResourceTypeError) Error() string
func (*NonResourceTypeError) SecondaryError ¶
func (e *NonResourceTypeError) SecondaryError() string
type NotCallableError ¶
func (*NotCallableError) Error ¶
func (e *NotCallableError) Error() string
type NotDeclaredError ¶
type NotDeclaredError struct { ExpectedKind common.DeclarationKind Name string Pos ast.Position }
func (*NotDeclaredError) EndPosition ¶
func (e *NotDeclaredError) EndPosition() ast.Position
func (*NotDeclaredError) Error ¶
func (e *NotDeclaredError) Error() string
func (*NotDeclaredError) SecondaryError ¶
func (e *NotDeclaredError) SecondaryError() string
func (*NotDeclaredError) StartPosition ¶
func (e *NotDeclaredError) StartPosition() ast.Position
type NotDeclaredMemberError ¶
func (*NotDeclaredMemberError) Error ¶
func (e *NotDeclaredMemberError) Error() string
func (*NotDeclaredMemberError) SecondaryError ¶
func (e *NotDeclaredMemberError) SecondaryError() string
type NotEquatableTypeError ¶
func (*NotEquatableTypeError) Error ¶
func (e *NotEquatableTypeError) Error() string
type NotExportedError ¶
func (*NotExportedError) EndPosition ¶
func (e *NotExportedError) EndPosition() ast.Position
func (*NotExportedError) Error ¶
func (e *NotExportedError) Error() string
func (*NotExportedError) StartPosition ¶
func (e *NotExportedError) StartPosition() ast.Position
type NotIndexableTypeError ¶
func (*NotIndexableTypeError) Error ¶
func (e *NotIndexableTypeError) Error() string
type NotIndexingTypeError ¶
func (*NotIndexingTypeError) Error ¶
func (e *NotIndexingTypeError) Error() string
type NumberType ¶
type NumberType struct{}
NumberType represents the super-type of all signed number types
func (*NumberType) ContainsFirstLevelInterfaceType ¶
func (*NumberType) ContainsFirstLevelInterfaceType() bool
func (*NumberType) Equal ¶
func (*NumberType) Equal(other Type) bool
func (*NumberType) ID ¶
func (*NumberType) ID() TypeID
func (*NumberType) IsInvalidType ¶
func (*NumberType) IsInvalidType() bool
func (*NumberType) IsResourceType ¶
func (*NumberType) IsResourceType() bool
func (*NumberType) IsType ¶
func (*NumberType) IsType()
func (*NumberType) MaxInt ¶
func (*NumberType) MaxInt() *big.Int
func (*NumberType) MinInt ¶
func (*NumberType) MinInt() *big.Int
func (*NumberType) QualifiedString ¶
func (*NumberType) QualifiedString() string
func (*NumberType) Resolve ¶
func (t *NumberType) Resolve(_ map[*TypeParameter]Type) Type
func (*NumberType) String ¶
func (*NumberType) String() string
func (*NumberType) TypeAnnotationState ¶
func (*NumberType) TypeAnnotationState() TypeAnnotationState
func (*NumberType) Unify ¶
func (*NumberType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Occurrence ¶
type Occurrences ¶
type Occurrences struct {
T *intervalst.IntervalST
}
func NewOccurrences ¶
func NewOccurrences() *Occurrences
func (*Occurrences) All ¶
func (o *Occurrences) All() []Occurrence
func (*Occurrences) Find ¶
func (o *Occurrences) Find(pos Position) *Occurrence
type Option ¶
func WithAccessCheckMode ¶
func WithAccessCheckMode(mode AccessCheckMode) Option
WithAccessCheckMode returns a checker option which sets the given mode for access control checks.
func WithAllCheckers ¶
func WithAllCheckers(allCheckers map[ast.LocationID]*Checker) Option
WithAllCheckers returns a checker option which sets the given map of checkers as the map of all checkers.
func WithCheckHandler ¶ added in v0.2.1
func WithCheckHandler(handler CheckHandlerFunc) Option
WithCheckHandler returns a checker option which sets the given function as the handler for the checking of the program.
func WithPredeclaredTypes ¶
func WithPredeclaredTypes(predeclaredTypes map[string]TypeDeclaration) Option
func WithPredeclaredValues ¶
func WithPredeclaredValues(predeclaredValues map[string]ValueDeclaration) Option
func WithValidTopLevelDeclarationsHandler ¶
func WithValidTopLevelDeclarationsHandler(handler func(location ast.Location) []common.DeclarationKind) Option
WithValidTopLevelDeclarationsHandler returns a checker option which sets the given handler as function which is used to determine the slice of declaration kinds which are valid at the top-level for a given location.
type OptionalType ¶
type OptionalType struct {
Type Type
}
OptionalType represents the optional variant of another type
func (*OptionalType) ContainsFirstLevelInterfaceType ¶
func (t *OptionalType) ContainsFirstLevelInterfaceType() bool
func (*OptionalType) Equal ¶
func (t *OptionalType) Equal(other Type) bool
func (*OptionalType) ID ¶
func (t *OptionalType) ID() TypeID
func (*OptionalType) IsInvalidType ¶
func (t *OptionalType) IsInvalidType() bool
func (*OptionalType) IsResourceType ¶
func (t *OptionalType) IsResourceType() bool
func (*OptionalType) IsType ¶
func (*OptionalType) IsType()
func (*OptionalType) QualifiedString ¶
func (t *OptionalType) QualifiedString() string
func (*OptionalType) Resolve ¶
func (t *OptionalType) Resolve(typeParameters map[*TypeParameter]Type) Type
func (*OptionalType) String ¶
func (t *OptionalType) String() string
func (*OptionalType) TypeAnnotationState ¶
func (t *OptionalType) TypeAnnotationState() TypeAnnotationState
func (*OptionalType) Unify ¶
func (t *OptionalType) Unify(other Type, typeParameters map[*TypeParameter]Type, report func(err error), outerRange ast.Range) bool
type OptionalTypeReferenceError ¶
func (*OptionalTypeReferenceError) Error ¶
func (e *OptionalTypeReferenceError) Error() string
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 PathType ¶
type PathType struct{}
func (*PathType) ContainsFirstLevelInterfaceType ¶
func (*PathType) IsInvalidType ¶
func (*PathType) IsResourceType ¶
func (*PathType) QualifiedString ¶
func (*PathType) TypeAnnotationState ¶
func (*PathType) TypeAnnotationState() TypeAnnotationState
type Position ¶
type Position struct { // line number, starting at 1 Line int // column number, starting at 0 (byte count) Column int }
func ToPosition ¶
type PostConditionsRewrite ¶
type PostConditionsRewrite struct { BeforeStatements []ast.Statement RewrittenPostConditions ast.Conditions }
type PublicAccountType ¶
type PublicAccountType struct{}
func (*PublicAccountType) CanHaveMembers ¶
func (*PublicAccountType) CanHaveMembers() bool
func (*PublicAccountType) ContainsFirstLevelInterfaceType ¶
func (*PublicAccountType) ContainsFirstLevelInterfaceType() bool
func (*PublicAccountType) Equal ¶
func (*PublicAccountType) Equal(other Type) bool
func (*PublicAccountType) ID ¶
func (*PublicAccountType) ID() TypeID
func (*PublicAccountType) IsInvalidType ¶
func (*PublicAccountType) IsInvalidType() bool
func (*PublicAccountType) IsResourceType ¶
func (*PublicAccountType) IsResourceType() bool
func (*PublicAccountType) IsType ¶
func (*PublicAccountType) IsType()
func (*PublicAccountType) QualifiedString ¶
func (*PublicAccountType) QualifiedString() string
func (*PublicAccountType) Resolve ¶
func (t *PublicAccountType) Resolve(_ map[*TypeParameter]Type) Type
func (*PublicAccountType) String ¶
func (*PublicAccountType) String() string
func (*PublicAccountType) TypeAnnotationState ¶
func (*PublicAccountType) TypeAnnotationState() TypeAnnotationState
func (*PublicAccountType) Unify ¶
func (*PublicAccountType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type ReadOnlyTargetAssignmentError ¶
func (*ReadOnlyTargetAssignmentError) Error ¶
func (e *ReadOnlyTargetAssignmentError) Error() string
type RedeclarationError ¶
type RedeclarationError struct { Kind common.DeclarationKind Name string Pos ast.Position PreviousPos *ast.Position }
func (*RedeclarationError) EndPosition ¶
func (e *RedeclarationError) EndPosition() ast.Position
func (*RedeclarationError) Error ¶
func (e *RedeclarationError) Error() string
func (*RedeclarationError) ErrorNotes ¶
func (e *RedeclarationError) ErrorNotes() []errors.ErrorNote
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 (*ReferenceType) CanHaveMembers ¶
func (t *ReferenceType) CanHaveMembers() bool
func (*ReferenceType) ContainsFirstLevelInterfaceType ¶
func (t *ReferenceType) ContainsFirstLevelInterfaceType() bool
func (*ReferenceType) ElementType ¶
func (t *ReferenceType) ElementType(isAssignment bool) Type
func (*ReferenceType) Equal ¶
func (t *ReferenceType) Equal(other Type) bool
func (*ReferenceType) ID ¶
func (t *ReferenceType) ID() TypeID
func (*ReferenceType) IndexingType ¶
func (t *ReferenceType) IndexingType() Type
func (*ReferenceType) IsInvalidType ¶
func (t *ReferenceType) IsInvalidType() bool
func (*ReferenceType) IsResourceType ¶
func (t *ReferenceType) IsResourceType() bool
func (*ReferenceType) IsType ¶
func (*ReferenceType) IsType()
func (*ReferenceType) QualifiedString ¶
func (t *ReferenceType) QualifiedString() string
func (*ReferenceType) Resolve ¶
func (t *ReferenceType) Resolve(_ map[*TypeParameter]Type) Type
func (*ReferenceType) String ¶
func (t *ReferenceType) String() string
func (*ReferenceType) TypeAnnotationState ¶
func (*ReferenceType) TypeAnnotationState() TypeAnnotationState
func (*ReferenceType) Unify ¶
func (*ReferenceType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type RepeatedImportError ¶
func (*RepeatedImportError) Error ¶
func (e *RepeatedImportError) Error() string
type ResourceCapturingError ¶
func (*ResourceCapturingError) EndPosition ¶
func (e *ResourceCapturingError) EndPosition() ast.Position
func (*ResourceCapturingError) Error ¶
func (e *ResourceCapturingError) Error() string
func (*ResourceCapturingError) StartPosition ¶
func (e *ResourceCapturingError) StartPosition() ast.Position
type ResourceFieldNotInvalidatedError ¶
func (*ResourceFieldNotInvalidatedError) EndPosition ¶
func (e *ResourceFieldNotInvalidatedError) EndPosition() ast.Position
func (*ResourceFieldNotInvalidatedError) Error ¶
func (e *ResourceFieldNotInvalidatedError) Error() string
func (*ResourceFieldNotInvalidatedError) SecondaryError ¶
func (e *ResourceFieldNotInvalidatedError) SecondaryError() string
func (*ResourceFieldNotInvalidatedError) StartPosition ¶
func (e *ResourceFieldNotInvalidatedError) StartPosition() ast.Position
type ResourceInfo ¶
type ResourceInfo struct { // DefinitivelyInvalidated is true if the invalidation of the resource // can be considered definitive DefinitivelyInvalidated bool // Invalidations is the set of invalidations of the resource Invalidations ResourceInvalidations // UsePositions is the set of uses of the resource UsePositions ResourceUses }
ResourceInfo is the info for a resource.
type ResourceInvalidation ¶
type ResourceInvalidation struct { Kind ResourceInvalidationKind StartPos ast.Position EndPos ast.Position }
type ResourceInvalidationEntry ¶
type ResourceInvalidationEntry struct {
ResourceInvalidation
}
ResourceInvalidationEntry allows using resource invalidations as entries in `hamt` structures
func (ResourceInvalidationEntry) Equal ¶
func (e ResourceInvalidationEntry) Equal(e2 hamt.Entry) bool
func (ResourceInvalidationEntry) Hash ¶
func (e ResourceInvalidationEntry) Hash() (result uint32)
type ResourceInvalidationKind ¶
type ResourceInvalidationKind uint
const ( ResourceInvalidationKindUnknown ResourceInvalidationKind = iota ResourceInvalidationKindMove ResourceInvalidationKindDestroy )
func (ResourceInvalidationKind) Name ¶
func (k ResourceInvalidationKind) Name() string
func (ResourceInvalidationKind) String ¶
func (i ResourceInvalidationKind) String() string
type ResourceInvalidationNote ¶
type ResourceInvalidationNote struct { ResourceInvalidation ast.Range }
func (ResourceInvalidationNote) Message ¶
func (n ResourceInvalidationNote) Message() string
type ResourceInvalidations ¶
type ResourceInvalidations struct {
// contains filtered or unexported fields
}
func (ResourceInvalidations) All ¶
func (ris ResourceInvalidations) All() (result []ResourceInvalidation)
func (ResourceInvalidations) Include ¶
func (ris ResourceInvalidations) Include(invalidation ResourceInvalidation) bool
func (ResourceInvalidations) Insert ¶
func (ris ResourceInvalidations) Insert(invalidation ResourceInvalidation) ResourceInvalidations
func (ResourceInvalidations) IsEmpty ¶
func (ris ResourceInvalidations) IsEmpty() bool
func (ResourceInvalidations) Merge ¶
func (ris ResourceInvalidations) Merge(other ResourceInvalidations) ResourceInvalidations
func (ResourceInvalidations) Size ¶
func (ris ResourceInvalidations) Size() int
type ResourceLossError ¶
func (*ResourceLossError) Error ¶
func (e *ResourceLossError) Error() string
type ResourceMethodBindingError ¶
func (*ResourceMethodBindingError) Error ¶
func (e *ResourceMethodBindingError) Error() string
type ResourceUse ¶
type ResourceUse struct {
UseAfterInvalidationReported bool
}
type ResourceUseAfterInvalidationError ¶
type ResourceUseAfterInvalidationError struct { StartPos ast.Position EndPos ast.Position Invalidations []ResourceInvalidation InLoop bool // contains filtered or unexported fields }
func (*ResourceUseAfterInvalidationError) Cause ¶
func (e *ResourceUseAfterInvalidationError) Cause() (wasMoved, wasDestroyed bool)
func (*ResourceUseAfterInvalidationError) EndPosition ¶
func (e *ResourceUseAfterInvalidationError) EndPosition() ast.Position
func (*ResourceUseAfterInvalidationError) Error ¶
func (e *ResourceUseAfterInvalidationError) Error() string
func (*ResourceUseAfterInvalidationError) ErrorNotes ¶
func (e *ResourceUseAfterInvalidationError) ErrorNotes() (notes []errors.ErrorNote)
func (*ResourceUseAfterInvalidationError) HasInvalidationInPreviousLoopIteration ¶
func (e *ResourceUseAfterInvalidationError) HasInvalidationInPreviousLoopIteration() (result bool)
func (*ResourceUseAfterInvalidationError) SecondaryError ¶
func (e *ResourceUseAfterInvalidationError) SecondaryError() string
func (*ResourceUseAfterInvalidationError) StartPosition ¶
func (e *ResourceUseAfterInvalidationError) StartPosition() ast.Position
type ResourceUseEntry ¶
type ResourceUses ¶
type ResourceUses struct {
// contains filtered or unexported fields
}
func (ResourceUses) AllPositions ¶
func (p ResourceUses) AllPositions() (result []ast.Position)
func (ResourceUses) Insert ¶
func (p ResourceUses) Insert(pos ast.Position) ResourceUses
func (ResourceUses) IsUseAfterInvalidationReported ¶
func (p ResourceUses) IsUseAfterInvalidationReported(pos ast.Position) bool
func (ResourceUses) MarkUseAfterInvalidationReported ¶
func (p ResourceUses) MarkUseAfterInvalidationReported(pos ast.Position) ResourceUses
func (ResourceUses) Merge ¶
func (p ResourceUses) Merge(other ResourceUses) ResourceUses
func (ResourceUses) Size ¶
func (p ResourceUses) Size() int
type Resources ¶
type Resources struct { Returns bool // contains filtered or unexported fields }
Resources is a map which contains invalidation info for resources.
func (*Resources) AddInvalidation ¶
func (ris *Resources) AddInvalidation(resource interface{}, invalidation ResourceInvalidation)
AddInvalidation adds the given invalidation to the set of invalidations for the given resource. Marks the resource to be definitely invalidated.
func (*Resources) AddUse ¶
AddUse adds the given use position to the set of use positions for the given resource.
func (*Resources) FirstRest ¶
func (ris *Resources) FirstRest() (interface{}, ResourceInfo, *Resources)
func (*Resources) ForEachResourceInfo ¶
func (ris *Resources) ForEachResourceInfo(f func(resource interface{}, info ResourceInfo))
func (*Resources) Get ¶
func (ris *Resources) Get(resource interface{}) ResourceInfo
Get returns the invalidation info for the given resource.
func (*Resources) IsUseAfterInvalidationReported ¶
func (*Resources) MarkUseAfterInvalidationReported ¶
func (*Resources) MergeBranches ¶
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.
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 (*RestrictedType) CanHaveMembers ¶
func (t *RestrictedType) CanHaveMembers() bool
func (*RestrictedType) ContainsFirstLevelInterfaceType ¶
func (*RestrictedType) ContainsFirstLevelInterfaceType() bool
func (*RestrictedType) Equal ¶
func (t *RestrictedType) Equal(other Type) bool
func (*RestrictedType) ID ¶
func (t *RestrictedType) ID() TypeID
func (*RestrictedType) IsInvalidType ¶
func (t *RestrictedType) IsInvalidType() bool
func (*RestrictedType) IsResourceType ¶
func (t *RestrictedType) IsResourceType() bool
func (*RestrictedType) IsType ¶
func (*RestrictedType) IsType()
func (*RestrictedType) QualifiedString ¶
func (t *RestrictedType) QualifiedString() string
func (*RestrictedType) Resolve ¶
func (t *RestrictedType) Resolve(_ map[*TypeParameter]Type) Type
func (*RestrictedType) RestrictionSet ¶
func (t *RestrictedType) RestrictionSet() InterfaceSet
func (*RestrictedType) String ¶
func (t *RestrictedType) String() string
func (*RestrictedType) TypeAnnotationState ¶
func (*RestrictedType) TypeAnnotationState() TypeAnnotationState
func (*RestrictedType) Unify ¶
func (*RestrictedType) Unify(_ Type, _ map[*TypeParameter]Type, _ 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
type RestrictionMemberClashError ¶
type RestrictionMemberClashError struct { Name string RedeclaringType *InterfaceType OriginalDeclaringType *InterfaceType ast.Range }
func (*RestrictionMemberClashError) Error ¶
func (e *RestrictionMemberClashError) Error() string
type ReturnInfo ¶
func (*ReturnInfo) Clone ¶
func (ri *ReturnInfo) Clone() *ReturnInfo
func (*ReturnInfo) MergeBranches ¶
func (ri *ReturnInfo) MergeBranches(thenReturnInfo *ReturnInfo, elseReturnInfo *ReturnInfo)
type SemanticError ¶
type SemanticError interface { error ast.HasPosition // contains filtered or unexported methods }
type SignedFixedPointType ¶
type SignedFixedPointType struct{}
SignedFixedPointType represents the super-type of all signed fixed-point types
func (*SignedFixedPointType) ContainsFirstLevelInterfaceType ¶
func (*SignedFixedPointType) ContainsFirstLevelInterfaceType() bool
func (*SignedFixedPointType) Equal ¶
func (*SignedFixedPointType) Equal(other Type) bool
func (*SignedFixedPointType) ID ¶
func (*SignedFixedPointType) ID() TypeID
func (*SignedFixedPointType) IsInvalidType ¶
func (*SignedFixedPointType) IsInvalidType() bool
func (*SignedFixedPointType) IsResourceType ¶
func (*SignedFixedPointType) IsResourceType() bool
func (*SignedFixedPointType) IsType ¶
func (*SignedFixedPointType) IsType()
func (*SignedFixedPointType) MaxInt ¶
func (*SignedFixedPointType) MaxInt() *big.Int
func (*SignedFixedPointType) MinInt ¶
func (*SignedFixedPointType) MinInt() *big.Int
func (*SignedFixedPointType) QualifiedString ¶
func (*SignedFixedPointType) QualifiedString() string
func (*SignedFixedPointType) Resolve ¶
func (t *SignedFixedPointType) Resolve(_ map[*TypeParameter]Type) Type
func (*SignedFixedPointType) String ¶
func (*SignedFixedPointType) String() string
func (*SignedFixedPointType) TypeAnnotationState ¶
func (*SignedFixedPointType) TypeAnnotationState() TypeAnnotationState
func (*SignedFixedPointType) Unify ¶
func (*SignedFixedPointType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type SignedIntegerType ¶
type SignedIntegerType struct{}
SignedIntegerType represents the super-type of all signed integer types
func (*SignedIntegerType) ContainsFirstLevelInterfaceType ¶
func (*SignedIntegerType) ContainsFirstLevelInterfaceType() bool
func (*SignedIntegerType) Equal ¶
func (*SignedIntegerType) Equal(other Type) bool
func (*SignedIntegerType) ID ¶
func (*SignedIntegerType) ID() TypeID
func (*SignedIntegerType) IsInvalidType ¶
func (*SignedIntegerType) IsInvalidType() bool
func (*SignedIntegerType) IsResourceType ¶
func (*SignedIntegerType) IsResourceType() bool
func (*SignedIntegerType) IsType ¶
func (*SignedIntegerType) IsType()
func (*SignedIntegerType) MaxInt ¶
func (*SignedIntegerType) MaxInt() *big.Int
func (*SignedIntegerType) MinInt ¶
func (*SignedIntegerType) MinInt() *big.Int
func (*SignedIntegerType) QualifiedString ¶
func (*SignedIntegerType) QualifiedString() string
func (*SignedIntegerType) Resolve ¶
func (t *SignedIntegerType) Resolve(_ map[*TypeParameter]Type) Type
func (*SignedIntegerType) String ¶
func (*SignedIntegerType) String() string
func (*SignedIntegerType) TypeAnnotationState ¶
func (*SignedIntegerType) TypeAnnotationState() TypeAnnotationState
func (*SignedIntegerType) Unify ¶
func (*SignedIntegerType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type SignedNumberType ¶
type SignedNumberType struct{}
SignedNumberType represents the super-type of all signed number types
func (*SignedNumberType) ContainsFirstLevelInterfaceType ¶
func (*SignedNumberType) ContainsFirstLevelInterfaceType() bool
func (*SignedNumberType) Equal ¶
func (*SignedNumberType) Equal(other Type) bool
func (*SignedNumberType) ID ¶
func (*SignedNumberType) ID() TypeID
func (*SignedNumberType) IsInvalidType ¶
func (*SignedNumberType) IsInvalidType() bool
func (*SignedNumberType) IsResourceType ¶
func (*SignedNumberType) IsResourceType() bool
func (*SignedNumberType) IsType ¶
func (*SignedNumberType) IsType()
func (*SignedNumberType) MaxInt ¶
func (*SignedNumberType) MaxInt() *big.Int
func (*SignedNumberType) MinInt ¶
func (*SignedNumberType) MinInt() *big.Int
func (*SignedNumberType) QualifiedString ¶
func (*SignedNumberType) QualifiedString() string
func (*SignedNumberType) Resolve ¶
func (t *SignedNumberType) Resolve(_ map[*TypeParameter]Type) Type
func (*SignedNumberType) String ¶
func (*SignedNumberType) String() string
func (*SignedNumberType) TypeAnnotationState ¶
func (*SignedNumberType) TypeAnnotationState() TypeAnnotationState
func (*SignedNumberType) Unify ¶
func (*SignedNumberType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type SpecialFunctionType ¶
type SpecialFunctionType struct { *FunctionType Members map[string]*Member }
func (*SpecialFunctionType) CanHaveMembers ¶
func (t *SpecialFunctionType) CanHaveMembers() bool
type StringType ¶
type StringType struct{}
StringType represents the string type
func (*StringType) CanHaveMembers ¶
func (*StringType) CanHaveMembers() bool
func (*StringType) ContainsFirstLevelInterfaceType ¶
func (*StringType) ContainsFirstLevelInterfaceType() bool
func (*StringType) ElementType ¶
func (t *StringType) ElementType(_ bool) Type
func (*StringType) Equal ¶
func (*StringType) Equal(other Type) bool
func (*StringType) ID ¶
func (*StringType) ID() TypeID
func (*StringType) IndexingType ¶
func (t *StringType) IndexingType() Type
func (*StringType) IsInvalidType ¶
func (*StringType) IsInvalidType() bool
func (*StringType) IsResourceType ¶
func (*StringType) IsResourceType() bool
func (*StringType) IsType ¶
func (*StringType) IsType()
func (*StringType) QualifiedString ¶
func (*StringType) QualifiedString() string
func (*StringType) Resolve ¶
func (t *StringType) Resolve(_ map[*TypeParameter]Type) Type
func (*StringType) String ¶
func (*StringType) String() string
func (*StringType) TypeAnnotationState ¶
func (*StringType) TypeAnnotationState() TypeAnnotationState
func (*StringType) Unify ¶
func (*StringType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type TransactionMissingPrepareError ¶
func (*TransactionMissingPrepareError) EndPosition ¶
func (e *TransactionMissingPrepareError) EndPosition() ast.Position
func (*TransactionMissingPrepareError) Error ¶
func (e *TransactionMissingPrepareError) Error() string
func (*TransactionMissingPrepareError) StartPosition ¶
func (e *TransactionMissingPrepareError) StartPosition() ast.Position
type TransactionType ¶
type TransactionType struct { Members map[string]*Member PrepareParameters []*Parameter Parameters []*Parameter }
func (*TransactionType) CanHaveMembers ¶
func (t *TransactionType) CanHaveMembers() bool
func (*TransactionType) ContainsFirstLevelInterfaceType ¶
func (*TransactionType) ContainsFirstLevelInterfaceType() bool
func (*TransactionType) EntryPointFunctionType ¶
func (t *TransactionType) EntryPointFunctionType() *FunctionType
func (*TransactionType) Equal ¶
func (*TransactionType) Equal(other Type) bool
func (*TransactionType) ExecuteFunctionType ¶
func (*TransactionType) ExecuteFunctionType() *SpecialFunctionType
func (*TransactionType) ID ¶
func (*TransactionType) ID() TypeID
func (*TransactionType) IsInvalidType ¶
func (*TransactionType) IsInvalidType() bool
func (*TransactionType) IsResourceType ¶
func (*TransactionType) IsResourceType() bool
func (*TransactionType) IsType ¶
func (*TransactionType) IsType()
func (*TransactionType) PrepareFunctionType ¶
func (t *TransactionType) PrepareFunctionType() *SpecialFunctionType
func (*TransactionType) QualifiedString ¶
func (*TransactionType) QualifiedString() string
func (*TransactionType) Resolve ¶
func (t *TransactionType) Resolve(_ map[*TypeParameter]Type) Type
func (*TransactionType) String ¶
func (*TransactionType) String() string
func (*TransactionType) TypeAnnotationState ¶
func (*TransactionType) TypeAnnotationState() TypeAnnotationState
func (*TransactionType) Unify ¶
func (*TransactionType) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Type ¶
type Type interface { IsType() ID() TypeID 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 TypeAnnotationState() TypeAnnotationState ContainsFirstLevelInterfaceType() 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 map[*TypeParameter]Type, 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(typeParameters map[*TypeParameter]Type) Type }
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 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 TypeDeclaration interface { TypeDeclarationType() Type TypeDeclarationKind() common.DeclarationKind TypeDeclarationPosition() ast.Position }
type TypeMismatchError ¶
func (*TypeMismatchError) Error ¶
func (e *TypeMismatchError) Error() string
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) 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
type TypeParameterTypeMismatchError ¶
type TypeParameterTypeMismatchError struct { TypeParameter *TypeParameter ExpectedType Type ActualType Type ast.Range }
func (*TypeParameterTypeMismatchError) Error ¶
func (e *TypeParameterTypeMismatchError) Error() string
func (*TypeParameterTypeMismatchError) SecondaryError ¶
func (e *TypeParameterTypeMismatchError) SecondaryError() string
type UFix64Type ¶
type UFix64Type struct{}
UFix64Type represents the 64-bit unsigned decimal fixed-point type `UFix64` which has a scale of 1E9, and checks for overflow and underflow
func (*UFix64Type) ContainsFirstLevelInterfaceType ¶
func (*UFix64Type) ContainsFirstLevelInterfaceType() bool
func (*UFix64Type) Equal ¶
func (*UFix64Type) Equal(other Type) bool
func (*UFix64Type) ID ¶
func (*UFix64Type) ID() TypeID
func (*UFix64Type) IsInvalidType ¶
func (*UFix64Type) IsInvalidType() bool
func (*UFix64Type) IsResourceType ¶
func (*UFix64Type) IsResourceType() bool
func (*UFix64Type) IsType ¶
func (*UFix64Type) IsType()
func (*UFix64Type) MaxFractional ¶
func (*UFix64Type) MaxFractional() *big.Int
func (*UFix64Type) MaxInt ¶
func (*UFix64Type) MaxInt() *big.Int
func (*UFix64Type) MinFractional ¶
func (*UFix64Type) MinFractional() *big.Int
func (*UFix64Type) MinInt ¶
func (*UFix64Type) MinInt() *big.Int
func (*UFix64Type) QualifiedString ¶
func (*UFix64Type) QualifiedString() string
func (*UFix64Type) Resolve ¶
func (t *UFix64Type) Resolve(_ map[*TypeParameter]Type) Type
func (*UFix64Type) Scale ¶
func (*UFix64Type) Scale() uint
func (*UFix64Type) String ¶
func (*UFix64Type) String() string
func (*UFix64Type) TypeAnnotationState ¶
func (*UFix64Type) TypeAnnotationState() TypeAnnotationState
func (*UFix64Type) Unify ¶
func (*UFix64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type UInt128Type ¶
type UInt128Type struct{}
UInt128Type represents the 128-bit unsigned integer type `UInt128` which checks for overflow and underflow
func (*UInt128Type) ContainsFirstLevelInterfaceType ¶
func (*UInt128Type) ContainsFirstLevelInterfaceType() bool
func (*UInt128Type) Equal ¶
func (*UInt128Type) Equal(other Type) bool
func (*UInt128Type) ID ¶
func (*UInt128Type) ID() TypeID
func (*UInt128Type) IsInvalidType ¶
func (*UInt128Type) IsInvalidType() bool
func (*UInt128Type) IsResourceType ¶
func (*UInt128Type) IsResourceType() bool
func (*UInt128Type) IsType ¶
func (*UInt128Type) IsType()
func (*UInt128Type) MaxInt ¶
func (*UInt128Type) MaxInt() *big.Int
func (*UInt128Type) MinInt ¶
func (*UInt128Type) MinInt() *big.Int
func (*UInt128Type) QualifiedString ¶
func (*UInt128Type) QualifiedString() string
func (*UInt128Type) Resolve ¶
func (t *UInt128Type) Resolve(_ map[*TypeParameter]Type) Type
func (*UInt128Type) String ¶
func (*UInt128Type) String() string
func (*UInt128Type) TypeAnnotationState ¶
func (*UInt128Type) TypeAnnotationState() TypeAnnotationState
func (*UInt128Type) Unify ¶
func (*UInt128Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type UInt16Type ¶
type UInt16Type struct{}
UInt16Type represents the 16-bit unsigned integer type `UInt16` which checks for overflow and underflow
func (*UInt16Type) ContainsFirstLevelInterfaceType ¶
func (*UInt16Type) ContainsFirstLevelInterfaceType() bool
func (*UInt16Type) Equal ¶
func (*UInt16Type) Equal(other Type) bool
func (*UInt16Type) ID ¶
func (*UInt16Type) ID() TypeID
func (*UInt16Type) IsInvalidType ¶
func (*UInt16Type) IsInvalidType() bool
func (*UInt16Type) IsResourceType ¶
func (*UInt16Type) IsResourceType() bool
func (*UInt16Type) IsType ¶
func (*UInt16Type) IsType()
func (*UInt16Type) MaxInt ¶
func (*UInt16Type) MaxInt() *big.Int
func (*UInt16Type) MinInt ¶
func (*UInt16Type) MinInt() *big.Int
func (*UInt16Type) QualifiedString ¶
func (*UInt16Type) QualifiedString() string
func (*UInt16Type) Resolve ¶
func (t *UInt16Type) Resolve(_ map[*TypeParameter]Type) Type
func (*UInt16Type) String ¶
func (*UInt16Type) String() string
func (*UInt16Type) TypeAnnotationState ¶
func (*UInt16Type) TypeAnnotationState() TypeAnnotationState
func (*UInt16Type) Unify ¶
func (*UInt16Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type UInt256Type ¶
type UInt256Type struct{}
UInt256Type represents the 256-bit unsigned integer type `UInt256` which checks for overflow and underflow
func (*UInt256Type) ContainsFirstLevelInterfaceType ¶
func (*UInt256Type) ContainsFirstLevelInterfaceType() bool
func (*UInt256Type) Equal ¶
func (*UInt256Type) Equal(other Type) bool
func (*UInt256Type) ID ¶
func (*UInt256Type) ID() TypeID
func (*UInt256Type) IsInvalidType ¶
func (*UInt256Type) IsInvalidType() bool
func (*UInt256Type) IsResourceType ¶
func (*UInt256Type) IsResourceType() bool
func (*UInt256Type) IsType ¶
func (*UInt256Type) IsType()
func (*UInt256Type) MaxInt ¶
func (*UInt256Type) MaxInt() *big.Int
func (*UInt256Type) MinInt ¶
func (*UInt256Type) MinInt() *big.Int
func (*UInt256Type) QualifiedString ¶
func (*UInt256Type) QualifiedString() string
func (*UInt256Type) Resolve ¶
func (t *UInt256Type) Resolve(_ map[*TypeParameter]Type) Type
func (*UInt256Type) String ¶
func (*UInt256Type) String() string
func (*UInt256Type) TypeAnnotationState ¶
func (*UInt256Type) TypeAnnotationState() TypeAnnotationState
func (*UInt256Type) Unify ¶
func (*UInt256Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type UInt32Type ¶
type UInt32Type struct{}
UInt32Type represents the 32-bit unsigned integer type `UInt32` which checks for overflow and underflow
func (*UInt32Type) ContainsFirstLevelInterfaceType ¶
func (*UInt32Type) ContainsFirstLevelInterfaceType() bool
func (*UInt32Type) Equal ¶
func (*UInt32Type) Equal(other Type) bool
func (*UInt32Type) ID ¶
func (*UInt32Type) ID() TypeID
func (*UInt32Type) IsInvalidType ¶
func (*UInt32Type) IsInvalidType() bool
func (*UInt32Type) IsResourceType ¶
func (*UInt32Type) IsResourceType() bool
func (*UInt32Type) IsType ¶
func (*UInt32Type) IsType()
func (*UInt32Type) MaxInt ¶
func (*UInt32Type) MaxInt() *big.Int
func (*UInt32Type) MinInt ¶
func (*UInt32Type) MinInt() *big.Int
func (*UInt32Type) QualifiedString ¶
func (*UInt32Type) QualifiedString() string
func (*UInt32Type) Resolve ¶
func (t *UInt32Type) Resolve(_ map[*TypeParameter]Type) Type
func (*UInt32Type) String ¶
func (*UInt32Type) String() string
func (*UInt32Type) TypeAnnotationState ¶
func (*UInt32Type) TypeAnnotationState() TypeAnnotationState
func (*UInt32Type) Unify ¶
func (*UInt32Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type UInt64Type ¶
type UInt64Type struct{}
UInt64Type represents the 64-bit unsigned integer type `UInt64` which checks for overflow and underflow
func (*UInt64Type) ContainsFirstLevelInterfaceType ¶
func (*UInt64Type) ContainsFirstLevelInterfaceType() bool
func (*UInt64Type) Equal ¶
func (*UInt64Type) Equal(other Type) bool
func (*UInt64Type) ID ¶
func (*UInt64Type) ID() TypeID
func (*UInt64Type) IsInvalidType ¶
func (*UInt64Type) IsInvalidType() bool
func (*UInt64Type) IsResourceType ¶
func (*UInt64Type) IsResourceType() bool
func (*UInt64Type) IsType ¶
func (*UInt64Type) IsType()
func (*UInt64Type) MaxInt ¶
func (*UInt64Type) MaxInt() *big.Int
func (*UInt64Type) MinInt ¶
func (*UInt64Type) MinInt() *big.Int
func (*UInt64Type) QualifiedString ¶
func (*UInt64Type) QualifiedString() string
func (*UInt64Type) Resolve ¶
func (t *UInt64Type) Resolve(_ map[*TypeParameter]Type) Type
func (*UInt64Type) String ¶
func (*UInt64Type) String() string
func (*UInt64Type) TypeAnnotationState ¶
func (*UInt64Type) TypeAnnotationState() TypeAnnotationState
func (*UInt64Type) Unify ¶
func (*UInt64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type UInt8Type ¶
type UInt8Type struct{}
UInt8Type represents the 8-bit unsigned integer type `UInt8` which checks for overflow and underflow
func (*UInt8Type) ContainsFirstLevelInterfaceType ¶
func (*UInt8Type) IsInvalidType ¶
func (*UInt8Type) IsResourceType ¶
func (*UInt8Type) QualifiedString ¶
func (*UInt8Type) TypeAnnotationState ¶
func (*UInt8Type) TypeAnnotationState() TypeAnnotationState
type UIntType ¶
type UIntType struct{}
UIntType represents the arbitrary-precision unsigned integer type `UInt`
func (*UIntType) ContainsFirstLevelInterfaceType ¶
func (*UIntType) IsInvalidType ¶
func (*UIntType) IsResourceType ¶
func (*UIntType) QualifiedString ¶
func (*UIntType) TypeAnnotationState ¶
func (*UIntType) TypeAnnotationState() TypeAnnotationState
type UninitializedFieldAccessError ¶
func (*UninitializedFieldAccessError) EndPosition ¶
func (e *UninitializedFieldAccessError) EndPosition() ast.Position
func (*UninitializedFieldAccessError) Error ¶
func (e *UninitializedFieldAccessError) Error() string
func (*UninitializedFieldAccessError) StartPosition ¶
func (e *UninitializedFieldAccessError) StartPosition() ast.Position
type UninitializedUseError ¶
func (*UninitializedUseError) EndPosition ¶
func (e *UninitializedUseError) EndPosition() ast.Position
func (*UninitializedUseError) Error ¶
func (e *UninitializedUseError) Error() string
func (*UninitializedUseError) StartPosition ¶
func (e *UninitializedUseError) StartPosition() ast.Position
type UnknownSpecialFunctionError ¶
func (*UnknownSpecialFunctionError) EndPosition ¶
func (e *UnknownSpecialFunctionError) EndPosition() ast.Position
func (*UnknownSpecialFunctionError) Error ¶
func (e *UnknownSpecialFunctionError) Error() string
func (*UnknownSpecialFunctionError) StartPosition ¶
func (e *UnknownSpecialFunctionError) StartPosition() ast.Position
type UnreachableStatementError ¶
func (*UnreachableStatementError) Error ¶
func (e *UnreachableStatementError) Error() string
type UnresolvedImportError ¶
func (*UnresolvedImportError) Error ¶
func (e *UnresolvedImportError) Error() string
type UnsupportedOptionalChainingAssignmentError ¶
func (*UnsupportedOptionalChainingAssignmentError) Error ¶
func (e *UnsupportedOptionalChainingAssignmentError) Error() string
type UnsupportedOverloadingError ¶
type UnsupportedOverloadingError struct { DeclarationKind common.DeclarationKind ast.Range }
func (*UnsupportedOverloadingError) Error ¶
func (e *UnsupportedOverloadingError) Error() string
type UnsupportedResourceForLoopError ¶
func (*UnsupportedResourceForLoopError) Error ¶
func (e *UnsupportedResourceForLoopError) Error() string
type ValueDeclaration ¶
type ValueIndexableType ¶
type ValueIndexableType interface { Type ElementType(isAssignment bool) Type IndexingType() Type // contains filtered or unexported methods }
ValueIndexableType is a type which can be indexed into using a value
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 // Depth is the depth of scopes in which the variable was declared Depth 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 // IsBaseValue indicates if the variable is a base value, // i.e. it is defined by the checker and not the program IsBaseValue bool }
type VariableActivations ¶
type VariableActivations struct {
// contains filtered or unexported fields
}
func NewValueActivations ¶
func NewValueActivations() *VariableActivations
func (*VariableActivations) Declare ¶
func (a *VariableActivations) Declare(declaration variableDeclaration) (variable *Variable, err error)
func (*VariableActivations) DeclareImplicitConstant ¶
func (a *VariableActivations) DeclareImplicitConstant( identifier string, ty Type, kind common.DeclarationKind, ) (*Variable, error)
func (*VariableActivations) DeclareType ¶
func (a *VariableActivations) DeclareType(declaration typeDeclaration) (*Variable, error)
func (*VariableActivations) Depth ¶
func (a *VariableActivations) Depth() int
func (*VariableActivations) Enter ¶
func (a *VariableActivations) Enter()
func (*VariableActivations) Find ¶
func (a *VariableActivations) Find(name string) *Variable
func (*VariableActivations) Leave ¶
func (a *VariableActivations) Leave()
func (*VariableActivations) Set ¶
func (a *VariableActivations) Set(name string, variable *Variable)
func (*VariableActivations) VariablesDeclaredInAndBelow ¶
func (a *VariableActivations) VariablesDeclaredInAndBelow(depth int) map[string]*Variable
type VariableSizedType ¶
type VariableSizedType struct {
Type Type
}
VariableSizedType is a variable sized array type
func (*VariableSizedType) CanHaveMembers ¶
func (t *VariableSizedType) CanHaveMembers() bool
func (*VariableSizedType) ContainsFirstLevelInterfaceType ¶
func (t *VariableSizedType) ContainsFirstLevelInterfaceType() bool
func (*VariableSizedType) ElementType ¶
func (t *VariableSizedType) ElementType(_ bool) Type
func (*VariableSizedType) Equal ¶
func (t *VariableSizedType) Equal(other Type) bool
func (*VariableSizedType) ID ¶
func (t *VariableSizedType) ID() TypeID
func (*VariableSizedType) IndexingType ¶
func (t *VariableSizedType) IndexingType() Type
func (*VariableSizedType) IsInvalidType ¶
func (t *VariableSizedType) IsInvalidType() bool
func (*VariableSizedType) IsResourceType ¶
func (t *VariableSizedType) IsResourceType() bool
func (*VariableSizedType) IsType ¶
func (*VariableSizedType) IsType()
func (*VariableSizedType) QualifiedString ¶
func (t *VariableSizedType) QualifiedString() string
func (*VariableSizedType) Resolve ¶
func (t *VariableSizedType) Resolve(typeParameters map[*TypeParameter]Type) Type
func (*VariableSizedType) String ¶
func (t *VariableSizedType) String() string
func (*VariableSizedType) TypeAnnotationState ¶
func (t *VariableSizedType) TypeAnnotationState() TypeAnnotationState
func (*VariableSizedType) Unify ¶
func (t *VariableSizedType) Unify( other Type, typeParameters map[*TypeParameter]Type, report func(err error), outerRange ast.Range, ) bool
type VoidType ¶
type VoidType struct{}
VoidType represents the void type
func (*VoidType) ContainsFirstLevelInterfaceType ¶
func (*VoidType) IsInvalidType ¶
func (*VoidType) IsResourceType ¶
func (*VoidType) QualifiedString ¶
func (*VoidType) TypeAnnotationState ¶
func (*VoidType) TypeAnnotationState() TypeAnnotationState
type Word16Type ¶
type Word16Type struct{}
Word16Type represents the 16-bit unsigned integer type `Word16` which does NOT check for overflow and underflow
func (*Word16Type) ContainsFirstLevelInterfaceType ¶
func (*Word16Type) ContainsFirstLevelInterfaceType() bool
func (*Word16Type) Equal ¶
func (*Word16Type) Equal(other Type) bool
func (*Word16Type) ID ¶
func (*Word16Type) ID() TypeID
func (*Word16Type) IsInvalidType ¶
func (*Word16Type) IsInvalidType() bool
func (*Word16Type) IsResourceType ¶
func (*Word16Type) IsResourceType() bool
func (*Word16Type) IsType ¶
func (*Word16Type) IsType()
func (*Word16Type) MaxInt ¶
func (*Word16Type) MaxInt() *big.Int
func (*Word16Type) MinInt ¶
func (*Word16Type) MinInt() *big.Int
func (*Word16Type) QualifiedString ¶
func (*Word16Type) QualifiedString() string
func (*Word16Type) Resolve ¶
func (t *Word16Type) Resolve(_ map[*TypeParameter]Type) Type
func (*Word16Type) String ¶
func (*Word16Type) String() string
func (*Word16Type) TypeAnnotationState ¶
func (*Word16Type) TypeAnnotationState() TypeAnnotationState
func (*Word16Type) Unify ¶
func (*Word16Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Word32Type ¶
type Word32Type struct{}
Word32Type represents the 32-bit unsigned integer type `Word32` which does NOT check for overflow and underflow
func (*Word32Type) ContainsFirstLevelInterfaceType ¶
func (*Word32Type) ContainsFirstLevelInterfaceType() bool
func (*Word32Type) Equal ¶
func (*Word32Type) Equal(other Type) bool
func (*Word32Type) ID ¶
func (*Word32Type) ID() TypeID
func (*Word32Type) IsInvalidType ¶
func (*Word32Type) IsInvalidType() bool
func (*Word32Type) IsResourceType ¶
func (*Word32Type) IsResourceType() bool
func (*Word32Type) IsType ¶
func (*Word32Type) IsType()
func (*Word32Type) MaxInt ¶
func (*Word32Type) MaxInt() *big.Int
func (*Word32Type) MinInt ¶
func (*Word32Type) MinInt() *big.Int
func (*Word32Type) QualifiedString ¶
func (*Word32Type) QualifiedString() string
func (*Word32Type) Resolve ¶
func (t *Word32Type) Resolve(_ map[*TypeParameter]Type) Type
func (*Word32Type) String ¶
func (*Word32Type) String() string
func (*Word32Type) TypeAnnotationState ¶
func (*Word32Type) TypeAnnotationState() TypeAnnotationState
func (*Word32Type) Unify ¶
func (*Word32Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Word64Type ¶
type Word64Type struct{}
Word64Type represents the 64-bit unsigned integer type `Word64` which does NOT check for overflow and underflow
func (*Word64Type) ContainsFirstLevelInterfaceType ¶
func (*Word64Type) ContainsFirstLevelInterfaceType() bool
func (*Word64Type) Equal ¶
func (*Word64Type) Equal(other Type) bool
func (*Word64Type) ID ¶
func (*Word64Type) ID() TypeID
func (*Word64Type) IsInvalidType ¶
func (*Word64Type) IsInvalidType() bool
func (*Word64Type) IsResourceType ¶
func (*Word64Type) IsResourceType() bool
func (*Word64Type) IsType ¶
func (*Word64Type) IsType()
func (*Word64Type) MaxInt ¶
func (*Word64Type) MaxInt() *big.Int
func (*Word64Type) MinInt ¶
func (*Word64Type) MinInt() *big.Int
func (*Word64Type) QualifiedString ¶
func (*Word64Type) QualifiedString() string
func (*Word64Type) Resolve ¶
func (t *Word64Type) Resolve(_ map[*TypeParameter]Type) Type
func (*Word64Type) String ¶
func (*Word64Type) String() string
func (*Word64Type) TypeAnnotationState ¶
func (*Word64Type) TypeAnnotationState() TypeAnnotationState
func (*Word64Type) Unify ¶
func (*Word64Type) Unify(_ Type, _ map[*TypeParameter]Type, _ func(err error), _ ast.Range) bool
type Word8Type ¶
type Word8Type struct{}
Word8Type represents the 8-bit unsigned integer type `Word8` which does NOT check for overflow and underflow
func (*Word8Type) ContainsFirstLevelInterfaceType ¶
func (*Word8Type) IsInvalidType ¶
func (*Word8Type) IsResourceType ¶
func (*Word8Type) QualifiedString ¶
func (*Word8Type) TypeAnnotationState ¶
func (*Word8Type) TypeAnnotationState() TypeAnnotationState
Source Files ¶
- accesscheckmode.go
- accesscheckmode_string.go
- before_extractor.go
- binaryoperationkind.go
- binaryoperationkind_string.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_reference_expression.go
- check_return_statement.go
- check_swap.go
- check_transaction_declaration.go
- check_unary_expression.go
- check_variable_declaration.go
- check_while.go
- checker.go
- containerkind.go
- containerkind_string.go
- declarations.go
- elaboration.go
- errors.go
- function_activations.go
- initialization_info.go
- member_set.go
- occurrences.go
- post_conditions_rewrite.go
- resource_invalidation.go
- resource_invalidations.go
- resource_uses.go
- resourceinvalidationkind.go
- resourceinvalidationkind_string.go
- resources.go
- return_info.go
- type.go
- typeannotationstate.go
- typeannotationstate_string.go
- typecheckfunc.go
- variable.go
- variable_activations.go