BUG: Generic Class Causes False Error with Inner Enum with Initializers

2 posts, 0 answers
  1. Chris Eargle
    Chris Eargle avatar
    7 posts
    Member since:
    Aug 2009

    Posted 30 Nov 2009 Link to this post

     

    This works fine:

            public abstract class Scope  
            {  
                private enum AccessOptions  
                {  
                    CurrentOnly = 0,  
                    AllAvailable = 1,  
                }  
            } 


    But this doesn't:

     

     

     

            public abstract class Scope<T> 
            {  
                private enum AccessOptions  
                {  
                    CurrentOnly = 0,  
                    AllAvailable = 1,  
                }  
            } 


    JustCode gives the following false error:

    C#: An instance of type 'ConsoleApplication12.Scope.AccessOptions' can not be assigned to a member of type 'ConsoleApplication12.Scope.AccessOptions' Program.cs ConsoleApplication12 18 17

     

     

     


     

  2. Ivo Bratoev
    Admin
    Ivo Bratoev avatar
    107 posts

    Posted 02 Dec 2009 Link to this post

    Hi Chris Eargle,
    Thanks for the bug report.
    I reproduced the problem and it is added to our backlog with highest priority.

    Regards,
    Ivo Bratoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top