@@ -0,0 +1,2108 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport com.fasterxml.jackson.annotation.*;%0A%0Aimport com.fasterxml.jackson.databind.*;%0A%0Aimport java.util.*;%0A%0Apublic class TestIssue877TypingWithId extends BaseMapTest%0A%7B%0A    interface BaseInterface %7B %7D%0A%0A    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = %22@id%22)%0A    static class BaseInterfaceImpl implements BaseInterface %7B%0A%0A        @JsonProperty%0A        private List%3CBaseInterfaceImpl%3E myInstances = new ArrayList%3CBaseInterfaceImpl%3E();%0A%0A        void addInstance(BaseInterfaceImpl instance) %7B%0A            myInstances.add(instance);%0A        %7D%0A    %7D%0A%0A    static class LisWrappert%3CT extends BaseInterface%3E %7B%0A%0A        @JsonProperty%0A        private List%3CT%3E myList = new ArrayList%3CT%3E();%0A%0A        void add(T t) %7B%0A            myList.add(t);%0A        %7D%0A%0A        int size() %7B%0A            return myList.size();%0A        %7D%0A    %7D%0A%0A    public void testIssue877() throws Exception%0A    %7B%0A        // make two instances%0A        BaseInterfaceImpl one = new BaseInterfaceImpl();%0A        BaseInterfaceImpl two = new BaseInterfaceImpl();%0A%0A        // add them to each other's list to show identify info being used%0A        one.addInstance(two);%0A        two.addInstance(one);%0A%0A        // make a typed version of the list and add the 2 instances to it%0A        LisWrappert%3CBaseInterfaceImpl%3E myList = new LisWrappert%3CBaseInterfaceImpl%3E();%0A        myList.add(one);%0A        myList.add(two);%0A%0A        // make an object mapper that will add class info in so deserialisation works%0A        ObjectMapper om = new ObjectMapper();%0A        om.enableDefaultTypingAsProperty(ObjectMapper.DefaultTyping.NON_FINAL, %22@class%22);%0A%0A        // write and print the JSON%0A        String json = om.writerWithDefaultPrettyPrinter().writeValueAsString(myList);%0A%0A        /*%0A        System.out.println(%22JSON:%5Cn%22+json);%0A        */%0A%0A        LisWrappert%3CBaseInterfaceImpl%3E result;%0A        %0A        result = om.readValue(json, myList.getClass());%0A%0A        assertNotNull(result);%0A        // see what we get back%0A        System.out.println(%22deserialised list size = %22 + result.size());%0A    %7D%0A%7D%0A

Add a test to reproduce [JACKSON-877]