"Let us suppose that a man, fallen from the clouds, walks the earth continuously in a straight line, I mean, in one of those great circles by which geographers divide it, and that nothing prevents him from traveling. Could he, after several days’ journey, decide that the earth is infinite, because he did not find its end? If he were wise and reserved in judgment, he would believe it to be quite large, but he would not judge it to be infinite. And as a result of walking, finding himself at the same place from which he departed, he would realise that he had actually gone around it. However, when the mind thinks of intelligible extension, when it seeks to measure the idea of space, it sees clearly that it is infinite. It cannot doubt that this idea is inexhaustible."
Nicolas Malebranche, Dialogues on Metaphysics and on Religion, I.IX (Jolley-Scott translation, p. 15). By ‘intelligible extension’ and ‘the idea of space’ here, Malebranche means the sort of extension and space studied by geometers. You can find out more about Malebranche (1638-1715) at the SEP, which also has an article on his theory of ideas.