Order unanimously reversed, without costs, motion granted and complaint dismissed against defendant town. Memorandum: Special Term erred in denying summary judgment to the Town of Ontario. In enacting the ordinance, the town was acting in a legislative capacity. As such, it has immunity which rests upon a regard for sound principles of government (see B & J Investors Corp. v Town Bd., 56 AD2d 882). “We know of no principle of law under which the state becomes liable because of the adoption of an unconstitutional statute.” (Barrett v State of New York, 220 NY 423, 429-430.) (Appeal from order of Supreme Court, Wayne County, Rosenbloom, J. — summary judgment.) Present — Dillon, P. J., Callahan, Doerr, Boomer and Moule, JJ.