fix new typecheck error by simplifying generated code for list init