Of course I meant John Kasich and had a typo.
I think the line of discussion was during appeal arguments when Cruz as Solicitor General of the State of Texas was defending some law of the State of Texas.
This had nothing to do with any legislation, just a state lawyer arguing for his state to have a law stay in place. During the sort of presentation, the appellant judge(s) can introduce any sort of hypothetical questions to have either side carry their argument through on why the court should do X or Y.
If, as you say, he was arguing a position as Solicitor General for the State of Texas, then he, personally, was not trying to “ban” didlos or anything else. That is the purview of legislators at various levels.
Relevance of Kasich is not clear yet.