INDIANAPOLIS (AP) The Indiana Supreme Court has upheld a woman’s will that made her adult son‘s inheritance dependent on whether he was married.

The court said in a 5-0 ruling last week that nothing in state law prohibits an inheritance from being based on certain behaviors.

The question stemmed from a Jackson County woman’s trust that awarded her adult son his inheritance outright if he was unmarried at the time of her 2016 death. It required that his share go into a subtrust controlled by her adult daughter if he still was married to his third wife. The Indiana Supreme Court disagreed with a state appeals court ruling that those conditions were an illegal restraint on marriage.