widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute.