Is acting childish a way of flirting?

Like if a guy tells you in front of his friends that he doesn't like you in that way. And then when you tell him you don't like him in that way either, he acts all childish by saying "good, I'm happy you don't like me in that way"

Is that a way of flirting? To add some context, he is 35 and I'm 23. We have known each other for about 3 years and since then we have flirted quite a lot with each other
Is acting childish a way of flirting?
Post Opinion