//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
// PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\

package ilog.language.design.types;

/**
 * @version     Last modified on Tue Nov 19 19:22:55 2002 by hak
 * @author      <a href="mailto:hak@ilog.fr">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; 2000-2002 <a href="http://www.ilog.fr/">ILOG, S.A.</a>
 */

public class TypeClashException extends FailedUnificationException
{
  public TypeClashException (Object detail)
    {
      _msg += "incompatible type";

      if (TypeChecker.GIVES_DETAILS)
        {
          Type.resetNames();
          _msg += ": "+detail;
        }
    }

  public TypeClashException (Type expected, Type found)
    {
      _msg += "incompatible type";

      if (TypeChecker.GIVES_DETAILS)
        {
          Type.resetNames();
          _msg += ": "+expected.toQuantifiedString()+", "+found.toQuantifiedString();
        }
    }
}
