When so required by resolution, the attorney general shall give his written opinion on questions of law to either house of the general assembly.