package de.dhbwstuttgart.syntaxtree.statement;

import de.dhbwstuttgart.syntaxtree.operator.Operator;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintsFactory;
import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.atn.SemanticContext;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

public class This extends Expression
{
    public This(Token offset)
    {
        super(TypePlaceholder.fresh(offset),offset);
    }
    
    public ArgumentList arglist;

    @Override
    public ConstraintSet getConstraints(TypeInferenceBlockInformation info) {
        ConstraintSet ret = new ConstraintSet();
        ret.addUndConstraint(ConstraintsFactory.createPair( this.getType(), info.getCurrentClass().getType(), PairOperator.EQUALSDOT, info));
        return ret;
    }
}
