C# Class Boo.Lang.Compiler.TypeSystem.GenericParameterInferrer

Datei anzeigen Open project: boo/boo-lang Class Usage Examples

Public Methods

Method Description
GenericParameterInferrer ( CompilerContext context, IMethod genericMethod, Boo.Lang.Compiler.Ast.ExpressionCollection arguments ) : System
GetInferredTypes ( ) : IType[]
Run ( ) : bool

Private Methods

Method Description
CalculateDependencies ( CallableSignature signature ) : void
CalculateDependencies ( IType inputType, IType outputType ) : void
FindGenericParameters ( IType type ) : IEnumerable
Fix ( IGenericParameter genericParameter, InferredType inferredType ) : bool
FixAll ( Predicate predicate ) : bool
GetInferredType ( IGenericParameter gp ) : IType
GetParameterTypes ( CallableSignature signature ) : IType[]
HasDependantsAndBounds ( InferredType inferredType ) : bool
HasNoDependencies ( InferredType inferredType ) : bool
HasUnfixedTypes ( ) : bool
Infer ( IType formalType, IType actualType, Inference inference ) : bool

Attempts to infer the type of generic parameters that occur in a formal parameter type according to its actual argument type.

InferArrayType ( IArrayType formalType, IType actualType, Inference inference ) : bool
InferCallableType ( ICallableType formalType, IType actualType, Inference inference ) : bool
InferCallables ( ) : void

Performs inference on implicitly typed callables whose input types have already been inferred.

Corresponds to the second phase in generic parameter inference according to the C# 3.0 spec.

InferConstructedType ( IType formalType, IType actualType, Inference inference ) : bool
InferExplicits ( ) : void

Performs inference on explicitly typed arguments.

Corresponds to the first phase in generic parameter inference according to the C# 3.0 spec.

InferGenericParameter ( IGenericParameter formalType, IType actualType, Inference inference ) : bool
InferSimpleType ( IType formalType, IType actualType, Inference inference ) : bool
InferenceComplete ( bool successfully ) : bool
InferenceStart ( ) : void
InitializeDependencies ( IGenericParameter genericParameters, CallableSignature signature ) : void
InitializeInferredTypes ( IEnumerable parameters ) : void
Invert ( Inference inference ) : Inference
SetDependency ( IGenericParameter dependant, IGenericParameter dependee ) : void

Method Details

GenericParameterInferrer() public method

public GenericParameterInferrer ( CompilerContext context, IMethod genericMethod, Boo.Lang.Compiler.Ast.ExpressionCollection arguments ) : System
context CompilerContext
genericMethod IMethod
arguments Boo.Lang.Compiler.Ast.ExpressionCollection
return System

GetInferredTypes() public method

public GetInferredTypes ( ) : IType[]
return IType[]

Run() public method

public Run ( ) : bool
return bool