If you are talking about private companies only then I think its ok. Unless Elensky pulls a Lithuania which would make Ukraine radioactive even to private Chinese companies, I think his comments didn't meet that threshold (although it got a bit close)China ofc isn't a charity, but stuff like this will make it much harder for Ukraine to say get chinese companies come and help with rebuilding the country as well as just investment in general.
Basically it's closing a door that was open.
As it stands now, if sufficient money is given, Chinese companies might hesitate a bit because of these comments, but they will ultimately get involved in Ukraine and they would tell Elensky to shut up and never mention Taiwan again instead
The issue, where would he find the money to give it to Chinese companies? Because I am darn sure that China won't lend Ukraine (maybe only a consolation loan so that it appears to care about it)