codegen: move the enum overflow checking closer to the conversion into enums
codegen: move the enum overflow checking closer to the conversion into enums

ruchevits/solidity,ruchevits/solidity,ruchevits/solidity,ruchevits/solidity