generator should now support subtypes