Inference/src/TypeSystem/Constraints/FieldTypeAssignmentConstraint.cs
/// <summary>
/// Checks the constraints of a attribute assigment in a method call
/// </summary>
/// <param name="methodAnalyzed">The method that is being analyzed when the operation is performed.</param>
/// <param name="actualImplicitObject">Only suitable in an assignment constraint. It represents the actual object used to pass the message.</param>
/// <param name="showInvocationMessage">To show the invocation line and column in case an error exists</param>
/// <param name="fileName">The name of its source file</param>
/// <param name="activeSortOfUnification">The active sort of unification used (Equivalent is the default
/// one and Incremental is used in the SSA bodies of the while, for and do statements)</param>
/// <param name="location">Location of the method call.</param>
/// <returns>The return type expression</returns>
Checks the constraints of a attribute assigment in a method call
Checks the constraints of a attribute assigment in a method call
public override TypeExpression Check(MethodType methodAnalyzed, TypeExpression actualImplicitObject, bool showInvocationMessage,
            SortOfUnification activeSortOfUnification, Location location) {
            SortOfUnification unification = activeSortOfUnification==SortOfUnification.Incremental ? SortOfUnification.Incremental: this.sortOfUnification;
            this.alpha.AcceptOperation(new AssignmentOperation(this.beta, AssignmentOperator.Assign, methodAnalyzed, unification, actualImplicitObject, location), null);
            return this.alpha;
        }
public override TypeExpression Check ( MethodType methodAnalyzed , TypeExpression actualImplicitObject , bool showInvocationMessage , SortOfUnification activeSortOfUnification , Location location ) { SortOfUnification unification = activeSortOfUnification == SortOfUnification . Incremental ? SortOfUnification . Incremental : this . sortOfUnification ; this . alpha . AcceptOperation ( new AssignmentOperation ( this . beta , AssignmentOperator . Assign , methodAnalyzed , unification , actualImplicitObject , location ) , null ) ; return this . alpha ; }
Checks the constraints of a attribute assigment in a method call
Checks the constraints of a attribute assigment in a method call
// * If the unification in the method call is incremental, this is the one to be used // * Infers the type
The return type expression
The return type expression
methodAnalyzed
MethodType
The method that is being analyzed when the operation is performed.
The method that is being analyzed when the operation is performed .
actualImplicitObject
TypeExpression
Only suitable in an assignment constraint. It represents the actual object used to pass the message.
Only suitable in an assignment constraint . It represents the actual object used to pass the message .
showInvocationMessage
bool
To show the invocation line and column in case an error exists
To show the invocation line and column in case an error exists
activeSortOfUnification
SortOfUnification
The active sort of unification used (Equivalent is the default
one and Incremental is used in the SSA bodies of the while, for and do statements)
The active sort of unification used ( Equivalent is the default one and Incremental is used in the SSA bodies of the while for and do statements )
location
Location
Location of the method call.
Location of the method call .
fileName
The name of its source file
The name of its source file