NestWhile and infinite loop

Obviously, the following code leads to an infinite loop:

(* TimeConstrained is used to avoid crash *)
TimeConstrained[
NestWhileList[# + 1 &, 1, # > 0 &], 1]


But why this does not?

TimeConstrained[
NestWhileList[# + 1 &, 1, True], 1]
(* ==> {1} *)


I use Mathematica 11.3 on windows 10.

Because True[1] === True evaluates to False.
The third argument of NestWhileList is supposed to be a function that has to be applied to the current iterate. The first time this function does not evaluate to True, the iteration is stopped and the current iterate is returned as last element of the returned list.
• I try to use True& instead, and it gives an infinite loop, just as your analysis. Thanks! – stone-zeng Aug 3 '18 at 8:02