Generic property referencing containing type crashes visual studio with StackOverflowException

Issue #65 resolved
Magnus Lidbom
created an issue

This, simple and common code structure, will cause the visual studio crash:

    [TsClass]
    public class Person
    {
        public List<Person> Children { get; set; } 
    }

Comments (3)

  1. Magnus Lidbom reporter

    There seems to be a workaround that you can apply if you can inherit the generic type. It seems that as long as the reference to the containing type is not within the type itself the crash does not occur:

        public class PersonList : List<Person>
        {
    
        }
    
        [TsClass]
        public class Person
        {
            public PersonList Children { get; set; } 
        }
    
  2. Log in to comment