The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
AssignmentError.cs
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
3 // Project rROTOR
4 // --------------------------------------------------------------------------
5 // File: AssignmentError.cs
6 // Author: Francisco Ortin - francisco.ortin@gmail.com
7 // Description:
8 // Represents a error produced when an assignment is not possible.
9 // --------------------------------------------------------------------------
10 // Create date: 23-04-2007
11 // Modification date: 23-04-2007
13 
14 using System;
15 using System.Collections.Generic;
16 using System.Text;
17 
18 namespace ErrorManagement {
22  public class AssignmentError : ErrorAdapter {
23 
24  #region Constructor
25 
34  public AssignmentError(string rightType, string leftType, Location loc)
35  : base(loc) {
36  StringBuilder aux = new StringBuilder();
37  aux.AppendFormat("Cannot assign an expression of type '{0}' to the '{1}' type.", rightType, leftType);
38  this.Description = aux.ToString();
39  }
40 
41  #endregion
42  }
43 }
AssignmentError(string rightType, string leftType, Location loc)
Constructor of UnknownMemberError
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Definition: Location.cs:24
System.Text.StringBuilder StringBuilder
Definition: CSharpParser.cs:4
Represents a error produced when the attribute identifier is not defined.
Represents an adapter of existing features in every error.
Definition: ErrorAdapter.cs:23