You were looking for strengths and positive attributes... and finding them.
The child was looking for perceived shortcomings... and blurting them without a filter.
Pointing out that you are looking for strengths, and inviting the child to share strengths s/he has noticed, may prove helpful in changing his/her focus.

I nearly ended the post with that thought.
However in over-thinking and making more connections, there may be something of interest to others...

The child pointing out perceived shortcomings could be rooted in immaturity and/or an unhealthy sense of competition and/or a fixed mindset. Or it could be mean-spirited, similar to labeling a child as a "try-hard."

Unfortunately, the child's propensity to offset positives with negatives might be role-modeled after attitudes exhibited by school teachers, as US public schools are working toward achieving equal outcomes. One strategy toward this goal is capping the growth of children at the top, and one way in which this may be accomplished is in seeking/finding/emphasizing weaknesses to offset strengths in gifted pupils. Hearing that a child is smart but does not possess good study skills may inspire a similar but inverse response when hearing that a child uses good study skills: commenting that the child is not smart.

Whatever the reason for the child's statements, s/he may find that his/her observations do not hold true for long. In lower grades, being gifted or smart is more based on measures of IQ or native intelligence, but as children age the emphasis is more based on achievement/accomplishment. There are in-school programs such as AVID which coach children toward achievement/accomplishment, as a means to close achievement gaps and excellence gaps. The same children s/he currently regards as not smart, may be among the top of the class in later grades.