So says the triple tradition about Jesus (Matthew 9:10ff., Mark 2:15ff. and Luke 5:27ff.):
And after these things he went forth, and saw a publican, named Levi, sitting at the receipt of custom: and he said unto him, Follow me. And he left all, rose up, and followed him. And Levi made him a great feast in his own house [a going away party?]: and there was a great company of publicans [tax collectors] and of others that sat down with them. But their scribes and Pharisees murmured against his disciples, saying, Why do ye eat and drink with publicans and sinners? And Jesus answering said unto them, They that are whole need not a physician; but they that are sick. I came not to call the righteous, but sinners to repentance.
Luke 7: 33ff. adds that he ate also with Simon the Pharisee, the setting for the absolution of the harlot who washed Jesus' feet with her tears:
For John the Baptist came neither eating bread nor drinking wine; and ye say, He hath a devil. The Son of man is come eating and drinking; and ye say, Behold a gluttonous man, and a winebibber, a friend of publicans and sinners! But wisdom is justified of all her children. And one of the Pharisees desired him that he would eat with him. And he went into the Pharisee's house, and sat down to meat.
And Luke 14:1ff. puts Jesus in the house of another Pharisee to eat, the setting for his remarkable teaching about divestiture to the poor:
And it came to pass, as he went into the house of one of the chief Pharisees to eat bread on the sabbath day, that they watched him. ...
So Jesus eats with just about everybody, except perhaps Sadducees.
But here in 1 Corinthians 5:9ff. Paul tells Gentile believers not to eat with fellow believers who openly sin, nor to keep company with them, but to put them out of the Christian community:
I wrote unto you in an epistle not to company with fornicators: Yet not altogether with the fornicators of this world, or with the covetous, or extortioners, or with idolaters; for then must ye needs go out of the world. But now I have written unto you not to keep company, if any man that is called a brother be a fornicator, or covetous, or an idolater, or a railer, or a drunkard, or an extortioner; with such an one no not to eat. For what have I to do to judge them also that are without? do not ye judge them that are within? But them that are without God judgeth. Therefore put away from among yourselves that wicked person.