@Override public boolean sameStructureAs(SemType type) { if (type.actualType() instanceof SemRecType) { SemRecType recordType = (SemRecType) (type.actualType()); if (this.getNumComps() != recordType.getNumComps()) return false; for (int i = 0; i < getNumComps(); i++) if (!this.getCompType(i).sameStructureAs(recordType.getCompType(i))) return false; return true; } else return false; }