package TP2.Error;
import TP2.asd.Interface.*;
public class TypeCheckExprDiag {
    private Type t;
    private String err;
    private boolean check;

    public TypeCheckExprDiag(Type type) {
        this.t = type;
        this.check = true;
        this.err = null;
    }

    public TypeCheckExprDiag(String error){
        this.err=error;
        this.check=false;
    }

    public boolean get_check(){
        return this.check;
    }
    
    public Type get_type(){
        return this.t;
    }
    
    public static TypeCheckExprDiag error(String err){
        return new TypeCheckExprDiag(err);
    }

    public static TypeCheckExprDiag checked(Type type){
        return new TypeCheckExprDiag(type);
    }
}
