}
public Type typeCheck(Type expected) throws TypeException {
// look for a class whose name matches some initial segment of pathList
TypeGroup typeGroup = getTypeGroup();
ownerType = Type.dereference(typeGroup.create(ownerTypeName));
if (ownerType.isUndefined()) {
throw new TypeException("StaticExpression.typeCheck : invalid path " + ownerTypeName + " to static field " + fieldName + getPos());
}
Class clazz = ownerType.getTargetClass();