Search in sources :

Example 1 with SetDescriptor

use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.compound.SetDescriptor in project TrufflePascal by Aspect26.

the class InNode method verifyChildrenNodeTypes.

@Override
public boolean verifyChildrenNodeTypes() {
    if (!(getRightNode().getType() instanceof SetDescriptor)) {
        return false;
    }
    TypeDescriptor valueType = getLeftNode().getType();
    SetDescriptor set = (SetDescriptor) getRightNode().getType();
    return set.getInnerType() == valueType || valueType.convertibleTo(set.getInnerType());
}
Also used : TypeDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeDescriptor) SetDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.compound.SetDescriptor)

Aggregations

TypeDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeDescriptor)1 SetDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.compound.SetDescriptor)1