Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics Map to base class #29

Open
tossthekitty opened this issue Apr 28, 2016 · 1 comment
Open

Generics Map to base class #29

tossthekitty opened this issue Apr 28, 2016 · 1 comment

Comments

@tossthekitty
Copy link

    public class BaseClass
    {
        public int Id { get; set; }
    }

    public class DerivedClass : BaseClass
    {
        public float MoreData { get; set; }//Dimensions ect. Inventory data
    }

    public class ContainerClass<T> where T : BaseClass
    {
        public IList<T> OrderItems { get; set; }
    }
    public class EnhancedContainerClass : ContainerClass<DerivedClass>
    {
    }

    EnhancedContainerClass enhanced = new EnhancedContainerClass();
    ... slapping generates a class with
        List<BaseClass> 
    where it should generate List<DerivedClass>

This is a stinker for me :(. Any chance you might be able to address this? I LOVE SLAPPER!
waltlounsbury@gmail.com

@odelvalle
Copy link
Member

@tossthekitty can you see if pull request #38 resolve your problem? Maybe can you include some test..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants